|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + extends: 'eslint:recommended', |
| 4 | + parserOptions: { |
| 5 | + ecmaVersion: 8, |
| 6 | + ecmaFeatures: { |
| 7 | + impliedStrict: true, |
| 8 | + }, |
| 9 | + }, |
| 10 | + env: { |
| 11 | + es6: true, |
| 12 | + browser: true, |
| 13 | + worker: true, |
| 14 | + webextensions: true, |
| 15 | + }, |
| 16 | + "rules": { |
| 17 | + 'linebreak-style': ['warn', 'unix'], |
| 18 | + 'unicode-bom': ['warn', 'never'], |
| 19 | + 'no-trailing-spaces': ['warn'], |
| 20 | + 'no-multi-spaces': ['warn'], |
| 21 | + 'no-tabs': ['warn'], |
| 22 | + 'eol-last': ['warn'], |
| 23 | + 'indent': ['warn', 2, { flatTernaryExpressions: true }], |
| 24 | + 'semi': ['warn', 'always'], |
| 25 | + 'no-extra-semi': ['off'], |
| 26 | + 'comma-dangle': ['warn', { |
| 27 | + "arrays": "always-multiline", |
| 28 | + "objects": "always-multiline", |
| 29 | + "functions": "never" |
| 30 | + }], |
| 31 | + |
| 32 | + 'no-multiple-empty-lines': ['warn', { max: 2 }], |
| 33 | + 'quotes': ['warn', 'single', { avoidEscape: true, allowTemplateLiterals: true }], |
| 34 | + 'arrow-parens': ['warn', 'as-needed'], |
| 35 | + 'quote-props': ['warn', 'as-needed'], |
| 36 | + 'dot-notation': ['warn'], |
| 37 | + |
| 38 | + 'arrow-spacing': ['warn'], |
| 39 | + 'block-spacing': ['warn'], |
| 40 | + 'comma-spacing': ['warn'], |
| 41 | + 'semi-spacing': ['warn'], |
| 42 | + 'computed-property-spacing': ['warn'], |
| 43 | + 'func-call-spacing': ['warn'], |
| 44 | + 'key-spacing': ['warn'], |
| 45 | + 'switch-colon-spacing': ['warn'], |
| 46 | + 'keyword-spacing': ['warn'], |
| 47 | + 'object-curly-spacing': ['warn', 'always'], |
| 48 | + 'array-bracket-spacing': ['warn', 'never'], |
| 49 | + 'template-tag-spacing': ['warn'], |
| 50 | + 'space-unary-ops': ['warn'], |
| 51 | + 'rest-spread-spacing': ['warn'], |
| 52 | + 'space-infix-ops': ['warn'], |
| 53 | + 'operator-linebreak': ['warn', 'after'], |
| 54 | + 'implicit-arrow-linebreak': ['warn'], |
| 55 | + 'no-whitespace-before-property': ['warn'], |
| 56 | + 'space-before-function-paren': ['warn', {anonymous: 'always', named: 'never', asyncArrow: 'always'}], |
| 57 | + 'space-in-parens': ['warn'], |
| 58 | + 'spaced-comment': ['warn', 'always', { |
| 59 | + line: { markers: ['/'] }, |
| 60 | + block: { markers: ['!'], exceptions: ['*'] } |
| 61 | + }], |
| 62 | + 'brace-style': ['warn', '1tbs', { allowSingleLine: true }], |
| 63 | + 'func-style': ['warn', 'expression', { allowArrowFunctions: true }], |
| 64 | + 'id-length': ['warn', { min: 0, max: 40, properties: 'never' }], |
| 65 | + |
| 66 | + 'eqeqeq': ['warn', 'always', {'null': 'ignore'}], |
| 67 | + 'wrap-iife': ['warn', 'outside'], |
| 68 | + 'yoda': ['warn', 'never', { onlyEquality: true }], |
| 69 | + 'no-var': ['warn'], |
| 70 | + 'no-constant-condition': ['warn', { checkLoops: false }], |
| 71 | + 'no-empty': ['warn'], |
| 72 | + |
| 73 | + 'no-undefined': ['warn'], |
| 74 | + 'no-shadow-restricted-names': ['warn'], |
| 75 | + 'no-throw-literal': ['warn'], |
| 76 | + 'no-eval': ['error'], |
| 77 | + 'no-implied-eval': ['error'], |
| 78 | + 'no-unused-vars': ['off'], |
| 79 | + 'no-implicit-globals': ['error'], |
| 80 | + 'no-new-wrappers': ['warn'], |
| 81 | + 'no-proto': ['warn'], |
| 82 | + 'operator-assignment': ['warn', 'always'], |
| 83 | + |
| 84 | + 'no-extra-label': ['warn'], |
| 85 | + |
| 86 | + 'consistent-return': ['warn'], |
| 87 | + |
| 88 | + 'radix': ['warn'], |
| 89 | + |
| 90 | + 'complexity': ['warn'], |
| 91 | + |
| 92 | + 'no-console': ['off'], |
| 93 | + 'no-async-promise-executor': ['off'], |
| 94 | + 'require-atomic-updates': ['off'], |
| 95 | + } |
| 96 | +} |
0 commit comments