|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "browser": false, |
| 4 | + "commonjs": true, |
| 5 | + "es6": true, |
| 6 | + "node": true, |
| 7 | + "mocha": true |
| 8 | + }, |
| 9 | + "parserOptions": { |
| 10 | + "ecmaVersion": "latest", |
| 11 | + "sourceType": "module" |
| 12 | + }, |
| 13 | + "rules": { |
| 14 | + "no-const-assign": "warn", |
| 15 | + "no-this-before-super": "warn", |
| 16 | + "no-undef": "warn", |
| 17 | + "no-unused-vars": "warn", |
| 18 | + "constructor-super": "warn", |
| 19 | + "valid-typeof": "warn", |
| 20 | + |
| 21 | + "indent": ["error", 2], |
| 22 | + "linebreak-style": ["error", "unix"], |
| 23 | + "quotes": ["error", "single"], |
| 24 | + "semi": ["error", "always"], |
| 25 | + "no-loop-func": ["error"], |
| 26 | + "block-spacing": ["error", "always"], |
| 27 | + "camelcase": ["error"], |
| 28 | + "eqeqeq": ["error", "always"], |
| 29 | + "strict": ["error", "global"], |
| 30 | + "brace-style": [ |
| 31 | + "error", |
| 32 | + "1tbs", |
| 33 | + { |
| 34 | + "allowSingleLine": true |
| 35 | + } |
| 36 | + ], |
| 37 | + "comma-style": ["error", "last"], |
| 38 | + "comma-spacing": [ |
| 39 | + "error", |
| 40 | + { |
| 41 | + "before": false, |
| 42 | + "after": true |
| 43 | + } |
| 44 | + ], |
| 45 | + "eol-last": ["error"], |
| 46 | + "func-call-spacing": ["error", "never"], |
| 47 | + "key-spacing": [ |
| 48 | + "error", |
| 49 | + { |
| 50 | + "beforeColon": false, |
| 51 | + "afterColon": true, |
| 52 | + "mode": "minimum" |
| 53 | + } |
| 54 | + ], |
| 55 | + "keyword-spacing": [ |
| 56 | + "error", |
| 57 | + { |
| 58 | + "before": true, |
| 59 | + "after": true, |
| 60 | + "overrides": { |
| 61 | + "function": { |
| 62 | + "after": false |
| 63 | + } |
| 64 | + } |
| 65 | + } |
| 66 | + ], |
| 67 | + "max-len": [ |
| 68 | + "error", |
| 69 | + { |
| 70 | + "code": 100, |
| 71 | + "ignoreUrls": true |
| 72 | + } |
| 73 | + ], |
| 74 | + "max-nested-callbacks": [ |
| 75 | + "error", |
| 76 | + { |
| 77 | + "max": 7 |
| 78 | + } |
| 79 | + ], |
| 80 | + "new-cap": [ |
| 81 | + "error", |
| 82 | + { |
| 83 | + "newIsCap": true, |
| 84 | + "capIsNew": false, |
| 85 | + "properties": true |
| 86 | + } |
| 87 | + ], |
| 88 | + "new-parens": ["error"], |
| 89 | + "no-lonely-if": ["error"], |
| 90 | + "no-trailing-spaces": ["error"], |
| 91 | + "no-unneeded-ternary": ["error"], |
| 92 | + "no-whitespace-before-property": ["error"], |
| 93 | + "object-curly-spacing": ["error", "always"], |
| 94 | + "operator-assignment": ["error", "always"], |
| 95 | + "operator-linebreak": ["error", "after"], |
| 96 | + "semi-spacing": [ |
| 97 | + "error", |
| 98 | + { |
| 99 | + "before": false, |
| 100 | + "after": true |
| 101 | + } |
| 102 | + ], |
| 103 | + "space-before-blocks": ["error", "always"], |
| 104 | + "space-before-function-paren": [ |
| 105 | + "error", |
| 106 | + { |
| 107 | + "anonymous": "never", |
| 108 | + "named": "never", |
| 109 | + "asyncArrow": "always" |
| 110 | + } |
| 111 | + ], |
| 112 | + "space-in-parens": ["error", "never"], |
| 113 | + "space-infix-ops": ["error"], |
| 114 | + "space-unary-ops": [ |
| 115 | + "error", |
| 116 | + { |
| 117 | + "words": true, |
| 118 | + "nonwords": false, |
| 119 | + "overrides": { |
| 120 | + "typeof": false |
| 121 | + } |
| 122 | + } |
| 123 | + ], |
| 124 | + "no-unreachable": ["error"], |
| 125 | + "no-global-assign": ["error"], |
| 126 | + "no-self-compare": ["error"], |
| 127 | + "no-unmodified-loop-condition": ["error"], |
| 128 | + "no-constant-condition": [ |
| 129 | + "error", |
| 130 | + { |
| 131 | + "checkLoops": false |
| 132 | + } |
| 133 | + ], |
| 134 | + "no-console": ["off"], |
| 135 | + "no-useless-concat": ["error"], |
| 136 | + "no-useless-escape": ["error"], |
| 137 | + "no-shadow-restricted-names": ["error"], |
| 138 | + "no-use-before-define": [ |
| 139 | + "error", |
| 140 | + { |
| 141 | + "functions": false |
| 142 | + } |
| 143 | + ], |
| 144 | + "arrow-parens": ["error", "always"], |
| 145 | + "arrow-body-style": ["error", "as-needed"], |
| 146 | + "arrow-spacing": ["error"], |
| 147 | + "no-confusing-arrow": [ |
| 148 | + "error", |
| 149 | + { |
| 150 | + "allowParens": true |
| 151 | + } |
| 152 | + ], |
| 153 | + "no-useless-computed-key": ["error"], |
| 154 | + "no-useless-rename": ["error"], |
| 155 | + "no-var": ["error"], |
| 156 | + "object-shorthand": ["error", "always"], |
| 157 | + "prefer-arrow-callback": ["error"], |
| 158 | + "prefer-const": ["error"], |
| 159 | + "prefer-numeric-literals": ["error"], |
| 160 | + "prefer-rest-params": ["error"], |
| 161 | + "prefer-spread": ["error"], |
| 162 | + "rest-spread-spacing": ["error", "never"], |
| 163 | + "template-curly-spacing": ["error", "never"] |
| 164 | + } |
| 165 | +} |
0 commit comments