Add ESLint support.

Used the Bootstrap master branch config and adapted it.

Also, remove the `babel-eslint` package since we don't use it.
This commit is contained in:
XhmikosR
2020-05-30 16:18:56 +03:00
parent ae1c128e04
commit 5ba59f1454
10 changed files with 567 additions and 365 deletions

46
dist/js/.eslintrc.json vendored Normal file
View File

@@ -0,0 +1,46 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script"
},
"env": {
"jquery": true
},
"extends": [
"plugin:unicorn/recommended",
"xo",
"xo/browser"
],
"rules": {
"capitalized-comments": "off",
"indent": [
"error",
2,
{
"MemberExpression": "off",
"SwitchCase": 1
}
],
"multiline-ternary": [
"error",
"always-multiline"
],
"object-curly-spacing": [
"error",
"always"
],
"semi": [
"error",
"never"
],
"strict": "error",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
"unicorn/prefer-dataset": "off",
"unicorn/prefer-includes": "off",
"unicorn/prefer-node-append": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prevent-abbreviations": "off"
}
}