|
| 1 | +module.exports = { |
| 2 | + parserOptions: { |
| 3 | + ecmaVersion: 6, |
| 4 | + ecmaFeatures: { |
| 5 | + experimentalObjectRestSpread: true, |
| 6 | + jsx: true |
| 7 | + }, |
| 8 | + sourceType: 'module' |
| 9 | + }, |
| 10 | + |
| 11 | + env: { |
| 12 | + es6: true, |
| 13 | + node: true, |
| 14 | + mocha: true |
| 15 | + }, |
| 16 | + |
| 17 | + plugins: ['vue'], |
| 18 | + |
| 19 | + globals: { |
| 20 | + expect: true, |
| 21 | + sinon: true, |
| 22 | + zanui: true, |
| 23 | + document: false, |
| 24 | + navigator: false, |
| 25 | + window: false, |
| 26 | + require: true, |
| 27 | + FileReader: true, |
| 28 | + File: true |
| 29 | + }, |
| 30 | + |
| 31 | + rules: { |
| 32 | + 'accessor-pairs': 2, |
| 33 | + 'arrow-spacing': [2, { 'before': true, 'after': true }], |
| 34 | + 'block-spacing': [2, 'always'], |
| 35 | + 'brace-style': [2, '1tbs', { 'allowSingleLine': true }], |
| 36 | + 'camelcase': [1, { 'properties': 'always' }], |
| 37 | + 'comma-dangle': [2, 'never'], |
| 38 | + 'comma-spacing': [2, { 'before': false, 'after': true }], |
| 39 | + 'comma-style': [2, 'last'], |
| 40 | + 'constructor-super': 2, |
| 41 | + 'curly': [2, 'multi-line'], |
| 42 | + 'dot-location': [2, 'property'], |
| 43 | + 'eol-last': 2, |
| 44 | + 'eqeqeq': [2, 'allow-null'], |
| 45 | + 'generator-star-spacing': [2, { 'before': true, 'after': true }], |
| 46 | + 'handle-callback-err': [2, '^(err|error)$' ], |
| 47 | + 'indent': [2, 2, { 'SwitchCase': 1 }], |
| 48 | + 'jsx-quotes': [2, 'prefer-double'], |
| 49 | + 'key-spacing': [2, { 'beforeColon': false, 'afterColon': true }], |
| 50 | + 'keyword-spacing': [2, { 'before': true, 'after': true }], |
| 51 | + 'new-cap': [2, { 'newIsCap': true, 'capIsNew': false }], |
| 52 | + 'new-parens': 2, |
| 53 | + 'no-array-constructor': 2, |
| 54 | + 'no-caller': 2, |
| 55 | + 'no-class-assign': 2, |
| 56 | + 'no-cond-assign': 2, |
| 57 | + 'no-const-assign': 2, |
| 58 | + 'no-control-regex': 2, |
| 59 | + 'no-delete-var': 2, |
| 60 | + 'no-dupe-args': 2, |
| 61 | + 'no-dupe-class-members': 2, |
| 62 | + 'no-dupe-keys': 2, |
| 63 | + 'no-duplicate-case': 2, |
| 64 | + 'no-empty-character-class': 2, |
| 65 | + 'no-empty-pattern': 2, |
| 66 | + 'no-eval': 2, |
| 67 | + 'no-ex-assign': 2, |
| 68 | + 'no-extend-native': 2, |
| 69 | + 'no-extra-bind': 2, |
| 70 | + 'no-extra-boolean-cast': 2, |
| 71 | + 'no-extra-parens': [2, 'functions'], |
| 72 | + 'no-fallthrough': 2, |
| 73 | + 'no-floating-decimal': 2, |
| 74 | + 'no-func-assign': 2, |
| 75 | + 'no-implied-eval': 2, |
| 76 | + 'no-inner-declarations': [2, 'functions'], |
| 77 | + 'no-invalid-regexp': 2, |
| 78 | + 'no-irregular-whitespace': 2, |
| 79 | + 'no-iterator': 2, |
| 80 | + 'no-label-var': 2, |
| 81 | + 'no-labels': [2, { 'allowLoop': false, 'allowSwitch': false }], |
| 82 | + 'no-lone-blocks': 2, |
| 83 | + 'no-mixed-spaces-and-tabs': 2, |
| 84 | + 'no-multi-spaces': 2, |
| 85 | + 'no-multi-str': 2, |
| 86 | + 'no-multiple-empty-lines': [2, { 'max': 1 }], |
| 87 | + 'no-native-reassign': 2, |
| 88 | + 'no-negated-in-lhs': 2, |
| 89 | + 'no-new-object': 2, |
| 90 | + 'no-new-require': 2, |
| 91 | + 'no-new-symbol': 2, |
| 92 | + 'no-new-wrappers': 2, |
| 93 | + 'no-obj-calls': 2, |
| 94 | + 'no-octal': 2, |
| 95 | + 'no-octal-escape': 2, |
| 96 | + 'no-path-concat': 2, |
| 97 | + 'no-proto': 2, |
| 98 | + 'no-redeclare': 2, |
| 99 | + 'no-regex-spaces': 2, |
| 100 | + 'no-return-assign': [2, 'except-parens'], |
| 101 | + 'no-self-assign': 2, |
| 102 | + 'no-self-compare': 2, |
| 103 | + 'no-sequences': 2, |
| 104 | + 'no-shadow-restricted-names': 2, |
| 105 | + 'no-spaced-func': 2, |
| 106 | + 'no-sparse-arrays': 2, |
| 107 | + 'no-this-before-super': 2, |
| 108 | + 'no-throw-literal': 2, |
| 109 | + 'no-trailing-spaces': 2, |
| 110 | + 'no-undef': 2, |
| 111 | + 'no-undef-init': 2, |
| 112 | + 'no-unexpected-multiline': 2, |
| 113 | + 'no-unmodified-loop-condition': 2, |
| 114 | + 'no-unneeded-ternary': [2, { 'defaultAssignment': false }], |
| 115 | + 'no-unreachable': 2, |
| 116 | + 'no-unsafe-finally': 2, |
| 117 | + 'no-unused-vars': [2, { 'vars': 'all', 'args': 'none' }], |
| 118 | + 'no-useless-call': 2, |
| 119 | + 'no-useless-computed-key': 2, |
| 120 | + 'no-useless-constructor': 2, |
| 121 | + 'no-useless-escape': 0, |
| 122 | + 'no-whitespace-before-property': 2, |
| 123 | + 'no-with': 2, |
| 124 | + 'one-var': [2, { 'initialized': 'never' }], |
| 125 | + 'operator-linebreak': [2, 'after', { 'overrides': { '?': 'before', ':': 'before' } }], |
| 126 | + 'padded-blocks': [2, 'never'], |
| 127 | + 'quotes': [2, 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }], |
| 128 | + 'semi': [2, 'always'], |
| 129 | + 'semi-spacing': [2, { 'before': false, 'after': true }], |
| 130 | + 'space-before-blocks': [2, 'always'], |
| 131 | + 'space-before-function-paren': [2, 'never'], |
| 132 | + 'space-in-parens': [2, 'never'], |
| 133 | + 'space-infix-ops': 2, |
| 134 | + 'space-unary-ops': [2, { 'words': true, 'nonwords': false }], |
| 135 | + 'spaced-comment': [2, 'always', { 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] }], |
| 136 | + 'template-curly-spacing': [2, 'never'], |
| 137 | + 'use-isnan': 2, |
| 138 | + 'valid-typeof': 2, |
| 139 | + 'wrap-iife': [2, 'any'], |
| 140 | + 'yield-star-spacing': [2, 'both'], |
| 141 | + 'yoda': [2, 'never'], |
| 142 | + 'prefer-const': 2, |
| 143 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, |
| 144 | + 'object-curly-spacing': [2, 'always', { objectsInObjects: false }], |
| 145 | + 'array-bracket-spacing': [2, 'never'], |
| 146 | + 'vue/jsx-uses-vars': 2 |
| 147 | + } |
| 148 | +} |
0 commit comments