|
| 1 | +module.exports = { |
| 2 | + 'extends': ['plugin:import/errors'], |
| 3 | + 'plugins': ['import'], |
| 4 | + 'env': { |
| 5 | + 'es6': true, |
| 6 | + 'node': true |
| 7 | + }, |
| 8 | + 'parserOptions': { |
| 9 | + 'ecmaVersion': 6, |
| 10 | + 'sourceType': 'module', |
| 11 | + 'ecmaFeatures': { |
| 12 | + 'impliedStrict': true, |
| 13 | + 'objectLiteralDuplicateProperties': false |
| 14 | + } |
| 15 | + }, |
| 16 | + 'rules': { |
| 17 | + 'array-bracket-spacing': ['error', 'never'], |
| 18 | + |
| 19 | + 'camelcase': ['error', { |
| 20 | + 'properties': 'never' |
| 21 | + }], |
| 22 | + |
| 23 | + 'comma-dangle': ['error', 'never'], |
| 24 | + |
| 25 | + 'curly': ['error', 'all'], |
| 26 | + |
| 27 | + 'eol-last': ['error'], |
| 28 | + |
| 29 | + 'indent': ['error', 2, { |
| 30 | + 'SwitchCase': 1 |
| 31 | + }], |
| 32 | + |
| 33 | + 'keyword-spacing': ['error'], |
| 34 | + |
| 35 | + 'max-len': ['error', { |
| 36 | + 'code': 180, |
| 37 | + 'ignoreComments': true, |
| 38 | + 'ignoreRegExpLiterals': true |
| 39 | + }], |
| 40 | + |
| 41 | + 'no-else-return': ['error'], |
| 42 | + |
| 43 | + 'no-mixed-spaces-and-tabs': ['error'], |
| 44 | + |
| 45 | + 'no-multiple-empty-lines': ['error'], |
| 46 | + |
| 47 | + 'no-spaced-func': ['error'], |
| 48 | + |
| 49 | + 'no-trailing-spaces': ['error'], |
| 50 | + |
| 51 | + 'no-undef': ['error'], |
| 52 | + |
| 53 | + 'no-unexpected-multiline': ['error'], |
| 54 | + |
| 55 | + 'no-unused-vars': ['error', { |
| 56 | + 'args': 'none', |
| 57 | + 'vars': 'all' |
| 58 | + }], |
| 59 | + |
| 60 | + 'quotes': ['error', 'single', { |
| 61 | + 'allowTemplateLiterals': true, |
| 62 | + 'avoidEscape': true |
| 63 | + }], |
| 64 | + |
| 65 | + 'semi': ['error', 'never'], |
| 66 | + |
| 67 | + 'space-before-blocks': ['error', 'always'], |
| 68 | + |
| 69 | + 'space-before-function-paren': ['error', 'never'], |
| 70 | + |
| 71 | + 'space-in-parens': ['error', 'never'], |
| 72 | + |
| 73 | + 'space-unary-ops': ['error', { |
| 74 | + 'nonwords': false, |
| 75 | + 'overrides': {} |
| 76 | + }], |
| 77 | + |
| 78 | + // 'valid-jsdoc': ['error'] |
| 79 | + |
| 80 | + // ECMAScript 6 rules |
| 81 | + |
| 82 | + 'arrow-body-style': ['error', 'as-needed', { |
| 83 | + 'requireReturnForObjectLiteral': false |
| 84 | + }], |
| 85 | + |
| 86 | + 'arrow-parens': ['error', 'always'], |
| 87 | + |
| 88 | + 'arrow-spacing': ['error', { |
| 89 | + 'after': true, |
| 90 | + 'before': true |
| 91 | + }], |
| 92 | + |
| 93 | + 'no-class-assign': ['error'], |
| 94 | + |
| 95 | + 'no-const-assign': ['error'], |
| 96 | + |
| 97 | + 'no-dupe-class-members': ['error'], |
| 98 | + |
| 99 | + 'no-duplicate-imports': ['error'], |
| 100 | + |
| 101 | + 'no-new-symbol': ['error'], |
| 102 | + |
| 103 | + 'no-useless-rename': ['error'], |
| 104 | + |
| 105 | + 'no-var': ['error'], |
| 106 | + |
| 107 | + 'object-shorthand': ['error', 'always', { |
| 108 | + 'avoidQuotes': true, |
| 109 | + 'ignoreConstructors': false |
| 110 | + }], |
| 111 | + |
| 112 | + 'prefer-arrow-callback': ['error', { |
| 113 | + 'allowNamedFunctions': false, |
| 114 | + 'allowUnboundThis': true |
| 115 | + }], |
| 116 | + |
| 117 | + 'prefer-const': ['error'], |
| 118 | + |
| 119 | + 'prefer-rest-params': ['error'], |
| 120 | + |
| 121 | + 'prefer-template': ['error'], |
| 122 | + |
| 123 | + 'template-curly-spacing': ['error', 'never'] |
| 124 | + } |
| 125 | +} |
0 commit comments