diff options
| -rw-r--r-- | .eslintrc | 68 | ||||
| -rw-r--r-- | .eslintrc.yml | 110 | ||||
| -rw-r--r-- | .gitattributes | 3 |
3 files changed, 111 insertions, 70 deletions
diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index f6f5a14..0000000 --- a/.eslintrc +++ /dev/null @@ -1,68 +0,0 @@ -{ - "extends": "eslint:recommended", - - "parserOptions": { - "ecmaVersion": 2017 - }, - - "env": { - "browser": true, - "es6": true, - "jquery": true - }, - - "rules": { - // - // 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) - } -} diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 0000000..96d004d --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,110 @@ +--- +root: true + +extends: + - eslint:recommended + +env: + # ECMAScript 2017 globals + es2017: true + + # Browser global variables + browser: true + + # jQuery global variables + jquery: true + +parserOptions: + # ECMAScript 2017 + ecmaVersion: 8 + +rules: + # =============== + # Possible Errors + # =============== + # + # The following rules point out areas where you might have made + # mistakes. + + # disallow or enforce trailing commas + comma-dangle: [error, never] + + # disallow use of console. + no-console: warn + + # ============== + # 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. + + # require the use of === and !== + eqeqeq: [error, always] + + # disallow the use of alert, confirm, and prompt + no-alert: error + + # disallow use of eval() + no-eval: error + + # disallow use of multiple spaces + no-multi-spaces: error + + # =========== + # Strict Mode + # =========== + # + # These rules relate to using strict mode. + + # controls location of Use Strict Directives + strict: [error, global] + + # ================ + # Stylistic Issues + # ================ + # + # These rules are purely matters of style and are quite subjective. + + # this option sets a 2-space indentation for your code + indent: [warn, 2] + + # enforce one true brace style (1tbs) + brace-style: warn + + # require camel case names + camelcase: warn + + # enforce spacing before and after comma + comma-spacing: [warn, {before: false, after: true}] + + # enforce one true comma style + comma-style: [warn, last] + + # enforce newline at the end of file, with no multiple empty lines + eol-last: [warn, always] + + # specify whether double or single quotes should be used + quotes: [warn, single] + + # require or disallow use of semicolons instead of ASI + semi: [warn, always] + + # enforce spacing before and after semicolons + semi-spacing: [warn, {before: false, after: true}] + + # sort variables within the same declaration block + sort-vars: warn + + # ============ + # ECMAScript 6 + # ============ + # + # These rules are only relevant to ES6 environments. + + # require let or const instead of var + no-var: error + +# Report unused eslint-disable comments +reportUnusedDisableDirectives: true diff --git a/.gitattributes b/.gitattributes index 6e0d999..539dab2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,7 +18,6 @@ resources/_gen/** linguist-generated .ecrc linguist-language=JSON .editorconfig linguist-language=INI -.eslintrc linguist-language=JSONC *.asc linguist-language=Public Key *.md linguist-detectable=true linguist-documentation=false *.webmanifest linguist-language=JSON @@ -51,7 +50,6 @@ SECURITY.md text eol=lf .ecrc text eol=lf diff=json .editorconfig text eol=lf -.eslintrc text eol=lf diff=json .gitattributes text eol=lf .gitignore text eol=lf .gitmodules text eol=lf @@ -66,6 +64,7 @@ netlify.toml text eol=lf .ecrc export-ignore .editorconfig export-ignore .eslintrc export-ignore +.eslintrc.yml export-ignore .gitattributes export-ignore .gitignore export-ignore .gitmodules export-ignore |
