|
1 | 1 | module.exports = {
|
2 |
| - extends: ['./js.js'] |
| 2 | + parser: 'babel-eslint', |
| 3 | + rules: { |
| 4 | + // Errors |
| 5 | + 'valid-jsdoc': [2], |
| 6 | + |
| 7 | + // Best practices |
| 8 | + 'array-callback-return': [1], |
| 9 | + 'block-scoped-var': [1], |
| 10 | + 'curly': [2, 'multi-line'], |
| 11 | + 'dot-location': [2, 'property'], |
| 12 | + 'dot-notation': [2], |
| 13 | + 'eqeqeq': [2], |
| 14 | + 'no-alert': [2], |
| 15 | + 'no-div-regex': [2], |
| 16 | + 'no-else-return': [1], |
| 17 | + 'no-empty-function': [2, { |
| 18 | + allow: ['arrowFunctions'] |
| 19 | + }], |
| 20 | + 'no-eq-null': [2], |
| 21 | + 'no-eval': [2], |
| 22 | + 'no-extend-native': [2], |
| 23 | + 'no-extra-bind': [1], |
| 24 | + 'no-global-assign': [2], |
| 25 | + 'no-implied-eval': [2], |
| 26 | + 'no-invalid-this': [2], |
| 27 | + 'no-iterator': [2], |
| 28 | + 'no-lone-blocks': [2], |
| 29 | + 'no-loop-func': [2], |
| 30 | + 'no-multi-spaces': [2], |
| 31 | + 'no-multi-str': [2], |
| 32 | + 'no-new': [1], |
| 33 | + 'no-proto': [2], |
| 34 | + 'no-restricted-properties': [1, { |
| 35 | + object: 'lodash', |
| 36 | + property: 'defaults', |
| 37 | + message: 'Please use Object.assign' |
| 38 | + }], |
| 39 | + 'no-return-assign': [2], |
| 40 | + 'no-script-url': [2], |
| 41 | + 'no-self-compare': [2], |
| 42 | + 'no-sequences': [1], |
| 43 | + 'no-throw-literal': [2], |
| 44 | + 'no-unmodified-loop-condition': [1], |
| 45 | + 'no-unused-expressions': [2], |
| 46 | + 'no-useless-call': [2], |
| 47 | + 'no-useless-concat': [1], |
| 48 | + 'no-useless-escape': [2], |
| 49 | + 'no-warning-comments': [1], |
| 50 | + 'no-with': [2], |
| 51 | + 'radix': [2], |
| 52 | + 'wrap-iife': [2], |
| 53 | + 'yoda': [2], |
| 54 | + |
| 55 | + // Variables |
| 56 | + 'no-unused-vars': [2, {args: 'after-used', varsIgnorePattern: '^_'}], |
| 57 | + 'no-catch-shadow': [2], |
| 58 | + 'no-shadow': [2], |
| 59 | + 'no-undefined': [2], |
| 60 | + 'no-use-before-define': [2], |
| 61 | + |
| 62 | + // Strict |
| 63 | + 'strict': [2, 'never'], |
| 64 | + |
| 65 | + // Style |
| 66 | + 'brace-style': [2], |
| 67 | + 'camelcase': [2], |
| 68 | + 'func-style': [2, 'expression'], |
| 69 | + 'indent': [2, 4], |
| 70 | + 'jsx-quotes': [2, 'prefer-double'], |
| 71 | + 'key-spacing': [2, { |
| 72 | + beforeColon: false, |
| 73 | + afterColon: true, |
| 74 | + mode: 'strict' |
| 75 | + }], |
| 76 | + 'keyword-spacing': [2, { |
| 77 | + before: true, |
| 78 | + after: true |
| 79 | + }], |
| 80 | + 'linebreak-style': [2, 'unix'], |
| 81 | + 'lines-around-comment': [2, { |
| 82 | + allowArrayStart: true, |
| 83 | + allowBlockStart: true, |
| 84 | + allowObjectStart: true, |
| 85 | + beforeBlockComment: true, |
| 86 | + beforeLineComment: true |
| 87 | + }], |
| 88 | + 'max-len': [2, 120, 4], |
| 89 | + 'new-parens': [2], |
| 90 | + 'newline-per-chained-call': [2], |
| 91 | + 'no-lonely-if': [1], |
| 92 | + 'no-mixed-operators': [1], |
| 93 | + 'no-multiple-empty-lines': [2, { |
| 94 | + max: 2, |
| 95 | + maxBOF: 0, |
| 96 | + maxEOF: 0 |
| 97 | + }], |
| 98 | + 'no-negated-condition': [2], |
| 99 | + 'no-plusplus': [2, { |
| 100 | + allowForLoopAfterthoughts: true |
| 101 | + }], |
| 102 | + 'no-tabs': [2], |
| 103 | + 'no-trailing-spaces': [2, { skipBlankLines: true }], |
| 104 | + 'no-unneeded-ternary': [2], |
| 105 | + 'object-property-newline': [2, { |
| 106 | + allowMultiplePropertiesPerLine: true |
| 107 | + }], |
| 108 | + 'one-var': [2, 'never'], |
| 109 | + 'operator-linebreak': [2, 'after'], |
| 110 | + 'quotes': [2, 'single', { |
| 111 | + 'allowTemplateLiterals': true, |
| 112 | + 'avoidEscape': true |
| 113 | + }], |
| 114 | + 'require-jsdoc': [1], |
| 115 | + 'semi': [2, 'always'], |
| 116 | + 'space-before-function-paren': [2, 'always'], |
| 117 | + |
| 118 | + // Node/CommonJS |
| 119 | + 'global-require': [2], |
| 120 | + 'handle-callback-err': [1], |
| 121 | + 'no-mixed-requires': [2], |
| 122 | + 'no-new-require': [2], |
| 123 | + 'no-path-concat': [2], |
| 124 | + }, |
| 125 | + env: { |
| 126 | + browser: true, |
| 127 | + node: true |
| 128 | + }, |
| 129 | + extends: ['eslint:recommended'] |
3 | 130 | };
|
0 commit comments