diff options
| -rw-r--r-- | .editorconfig | 2 | ||||
| -rw-r--r-- | .eslintrc | 69 |
2 files changed, 65 insertions, 6 deletions
diff --git a/.editorconfig b/.editorconfig index 04255df..0ec9ed4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false -[*.{svg,css,scss,json,webmanifest,yaml,yml,toml,md,babelrc,eslintrc,postcssrc,stylelintrc,ecrc,gitattributes}] +[*.{svg,css,scss,js,json,webmanifest,yaml,yml,toml,md,babelrc,eslintrc,postcssrc,stylelintrc,ecrc,gitattributes}] indent_size = 2 [layouts/**.{svg}] @@ -1,9 +1,68 @@ { - "extends": "airbnb-base/legacy", + "extends": "eslint:recommended", + + "parserOptions": { + "ecmaVersion": 2017 + }, + + "env": { + "browser": true, + "es6": true, + "jquery": true + }, + "rules": { - "indent": [2, "tab"], - "no-tabs": 0, - "no-unused-vars": 0, - "no-shadow-restricted-names": 0 + // + // Possible Errors + // + // The following rules point out areas where you might have made mistakes. + // + "comma-dangle": 2, // disallow or enforce trailing commas + "no-console": 1, // disallow use of console (off by default in the node environment) + "no-debugger": 2, // disallow use of debugger + "no-empty": 2, // disallow empty statements + "no-extra-semi": 2, // disallow unnecessary semicolons + + // + // Best Practices + // + // These are rules designed to prevent you from making mistakes. + // They either prescribe a better way of doing something or help you avoid footguns. + // + "eqeqeq": 2, // require the use of === and !== + "no-alert": 2, // disallow the use of alert, confirm, and prompt + "no-eval": 2, // disallow use of eval() + "no-multi-spaces": 2, // disallow use of multiple spaces + "no-redeclare": 2, // disallow declaring the same variable more then once + + // + // Strict Mode + // + // These rules relate to using strict mode. + // + "strict": 0, // controls location of Use Strict Directives + + // + // Stylistic Issues + // + // These rules are purely matters of style and are quite subjective. + // + "indent": [1, 2], // this option sets a specific tab width for your code (off by default) + "brace-style": 1, // enforce one true brace style (off by default) + "camelcase": 1, // require camel case names + "comma-spacing": [1, {"before": false, "after": true}], // enforce spacing before and after comma + "comma-style": [1, "last"], // enforce one true comma style (off by default) + "eol-last": 1, // enforce newline at the end of file, with no multiple empty lines + "quotes": [1, "single"], // specify whether double or single quotes should be used + "semi": [1, "always"], // require or disallow use of semicolons instead of ASI + "semi-spacing": [1, {"before": false, "after": true}], // enforce spacing before and after semicolons + "sort-vars": 0, // sort variables within the same declaration block (off by default) + + // + // ECMAScript 6 + // + // These rules are only relevant to ES6 environments and are off by default. + // + "no-var": 2 // require let or const instead of var (off by default) } } |
