| 1 | module.exports = |
| 2 | { |
| 3 | env: |
| 4 | { |
| 5 | browser: true, |
| 6 | es6: true, |
| 7 | node: true, |
| 8 | 'jest/globals': true |
| 9 | }, |
| 10 | plugins: |
| 11 | [ |
| 12 | 'jest' |
| 13 | ], |
| 14 | extends: |
| 15 | [ |
| 16 | 'eslint:recommended' |
| 17 | ], |
| 18 | settings: {}, |
| 19 | parserOptions: |
| 20 | { |
| 21 | ecmaVersion: 2018, |
| 22 | sourceType: 'module', |
| 23 | ecmaFeatures: |
| 24 | { |
| 25 | impliedStrict: true |
| 26 | } |
| 27 | }, |
| 28 | rules: |
| 29 | { |
| 30 | 'array-bracket-spacing': [ 2, 'always', |
| 31 | { |
| 32 | objectsInArrays: true, |
| 33 | arraysInArrays: true |
| 34 | }], |
| 35 | 'arrow-parens': [ 2, 'always' ], |
| 36 | 'arrow-spacing': 2, |
| 37 | 'block-spacing': [ 2, 'always' ], |
| 38 | 'brace-style': [ 2, 'allman', { allowSingleLine: true } ], |
| 39 | 'comma-dangle': 2, |
| 40 | 'comma-spacing': [ 2, { before: false, after: true } ], |
| 41 | 'comma-style': 2, |
| 42 | 'computed-property-spacing': 2, |
| 43 | 'constructor-super': 2, |
| 44 | 'func-call-spacing': 2, |
| 45 | 'generator-star-spacing': 2, |
| 46 | 'guard-for-in': 2, |
| 47 | 'indent': [ 2, 'tab', { 'SwitchCase': 1 } ], |
| 48 | 'key-spacing': [ 2, |
| 49 | { |
| 50 | singleLine: |
| 51 | { |
| 52 | beforeColon: false, |
| 53 | afterColon: true |
| 54 | }, |
| 55 | multiLine: |
| 56 | { |
| 57 | beforeColon: true, |
| 58 | afterColon: true, |
| 59 | align: 'colon' |
| 60 | } |
| 61 | }], |
| 62 | 'keyword-spacing': 2, |
| 63 | 'linebreak-style': [ 2, 'unix' ], |
| 64 | 'lines-around-comment': [ 2, |
| 65 | { |
| 66 | allowBlockStart: true, |
| 67 | allowObjectStart: true, |
| 68 | beforeBlockComment: true, |
| 69 | beforeLineComment: false |
| 70 | }], |
| 71 | 'max-len': [ 2, 90, |
| 72 | { |
| 73 | tabWidth: 2, |
| 74 | comments: 100, |
| 75 | ignoreUrls: true, |
| 76 | ignoreStrings: true, |
| 77 | ignoreTemplateLiterals: true, |
| 78 | ignoreRegExpLiterals: true |
| 79 | }], |
| 80 | 'newline-after-var': 2, |
| 81 | 'newline-before-return': 2, |
| 82 | 'newline-per-chained-call': 2, |
| 83 | 'no-alert': 2, |
| 84 | 'no-caller': 2, |
| 85 | 'no-case-declarations': 2, |
| 86 | 'no-catch-shadow': 2, |
| 87 | 'no-class-assign': 2, |
| 88 | 'no-confusing-arrow': 2, |
| 89 | 'no-console': 2, |
| 90 | 'no-const-assign': 2, |
| 91 | 'no-debugger': 2, |
| 92 | 'no-dupe-args': 2, |
| 93 | 'no-dupe-keys': 2, |
| 94 | 'no-duplicate-case': 2, |
| 95 | 'no-div-regex': 2, |
| 96 | 'no-empty': [ 2, { allowEmptyCatch: true } ], |
| 97 | 'no-empty-pattern': 2, |
| 98 | 'no-else-return': 0, |
| 99 | 'no-eval': 2, |
| 100 | 'no-extend-native': 2, |
| 101 | 'no-ex-assign': 2, |
| 102 | 'no-extra-bind': 2, |
| 103 | 'no-extra-boolean-cast': 2, |
| 104 | 'no-extra-label': 2, |
| 105 | 'no-extra-semi': 2, |
| 106 | 'no-fallthrough': 2, |
| 107 | 'no-func-assign': 2, |
| 108 | 'no-global-assign': 2, |
| 109 | 'no-implicit-coercion': 2, |
| 110 | 'no-implicit-globals': 2, |
| 111 | 'no-inner-declarations': 2, |
| 112 | 'no-invalid-regexp': 2, |
| 113 | 'no-invalid-this': 2, |
| 114 | 'no-irregular-whitespace': 2, |
| 115 | 'no-lonely-if': 2, |
| 116 | 'no-mixed-operators': 2, |
| 117 | 'no-mixed-spaces-and-tabs': 2, |
| 118 | 'no-multi-spaces': 2, |
| 119 | 'no-multi-str': 2, |
| 120 | 'no-multiple-empty-lines': [ 1, { max: 1, maxEOF: 0, maxBOF: 0 } ], |
| 121 | 'no-native-reassign': 2, |
| 122 | 'no-negated-in-lhs': 2, |
| 123 | 'no-new': 2, |
| 124 | 'no-new-func': 2, |
| 125 | 'no-new-wrappers': 2, |
| 126 | 'no-obj-calls': 2, |
| 127 | 'no-proto': 2, |
| 128 | 'no-prototype-builtins': 0, |
| 129 | 'no-redeclare': 2, |
| 130 | 'no-regex-spaces': 2, |
| 131 | 'no-restricted-imports': 2, |
| 132 | 'no-return-assign': 2, |
| 133 | 'no-self-assign': 2, |
| 134 | 'no-self-compare': 2, |
| 135 | 'no-sequences': 2, |
| 136 | 'no-shadow': 2, |
| 137 | 'no-shadow-restricted-names': 2, |
| 138 | 'no-spaced-func': 2, |
| 139 | 'no-sparse-arrays': 2, |
| 140 | 'no-this-before-super': 2, |
| 141 | 'no-throw-literal': 2, |
| 142 | 'no-undef': 2, |
| 143 | 'no-unexpected-multiline': 2, |
| 144 | 'no-unmodified-loop-condition': 2, |
| 145 | 'no-unreachable': 2, |
| 146 | 'no-unused-vars': [ 1, { vars: 'all', args: 'after-used' }], |
| 147 | 'no-use-before-define': [ 2, { functions: false } ], |
| 148 | 'no-useless-call': 2, |
| 149 | 'no-useless-computed-key': 2, |
| 150 | 'no-useless-concat': 2, |
| 151 | 'no-useless-rename': 2, |
| 152 | 'no-var': 2, |
| 153 | 'no-whitespace-before-property': 2, |
| 154 | 'object-curly-newline': 0, |
| 155 | 'object-curly-spacing': [ 2, 'always' ], |
| 156 | 'object-property-newline': [ 2, { allowMultiplePropertiesPerLine: true } ], |
| 157 | 'prefer-const': 2, |
| 158 | 'prefer-rest-params': 2, |
| 159 | 'prefer-spread': 2, |
| 160 | 'prefer-template': 2, |
| 161 | 'quotes': [ 2, 'single', { avoidEscape: true } ], |
| 162 | 'semi': [ 2, 'always' ], |
| 163 | 'semi-spacing': 2, |
| 164 | 'space-before-blocks': 2, |
| 165 | 'space-before-function-paren': [ 2, |
| 166 | { |
| 167 | anonymous : 'never', |
| 168 | named : 'never', |
| 169 | asyncArrow : 'always' |
| 170 | }], |
| 171 | 'space-in-parens': [ 2, 'never' ], |
| 172 | 'spaced-comment': [ 2, 'always' ], |
| 173 | 'strict': 2, |
| 174 | 'valid-typeof': 2, |
| 175 | 'yoda': 2 |
| 176 | } |
| 177 | }; |