|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + browser: true, |
| 5 | + es6: true, |
| 6 | + node: true, |
| 7 | + }, |
| 8 | + |
| 9 | + extends: ['eslint:recommended', 'airbnb-base', 'plugin:vue/recommended', 'plugin:vue-types/strongly-recommended'], |
| 10 | + plugins: ['babel'], |
| 11 | + |
| 12 | + globals: { |
| 13 | + Atomics: 'readonly', |
| 14 | + SharedArrayBuffer: 'readonly', |
| 15 | + }, |
| 16 | + |
| 17 | + parserOptions: { |
| 18 | + parser: 'babel-eslint', |
| 19 | + ecmaVersion: 2019, |
| 20 | + sourceType: 'module', |
| 21 | + }, |
| 22 | + |
| 23 | + |
| 24 | + rules: { |
| 25 | + 'no-unused-expressions': 'off', |
| 26 | + 'babel/no-unused-expressions': 'error', |
| 27 | + 'no-param-reassign': [ |
| 28 | + 'error', |
| 29 | + { props: true, ignorePropertyModificationsFor: ['state', 'el'] }, |
| 30 | + ], |
| 31 | + 'space-before-function-paren': ['error', 'always'], |
| 32 | + 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
| 33 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
| 34 | + 'import/no-extraneous-dependencies': 'off', |
| 35 | + 'linebreak-style': 'off', |
| 36 | + 'no-tabs': 'off', |
| 37 | + 'vue/attribute-hyphenation': [ |
| 38 | + 2, |
| 39 | + 'never', |
| 40 | + { |
| 41 | + ignore: [ |
| 42 | + 'stroke-width', |
| 43 | + 'font-size', |
| 44 | + 'text-anchor', |
| 45 | + 'stroke-dasharray', |
| 46 | + 'stop-color', |
| 47 | + 'stop-opacity', |
| 48 | + ], |
| 49 | + }, |
| 50 | + ], |
| 51 | + 'vue/html-closing-bracket-newline': [ |
| 52 | + 'error', |
| 53 | + { |
| 54 | + singleline: 'never', |
| 55 | + multiline: 'always', |
| 56 | + }, |
| 57 | + ], |
| 58 | + 'vue/html-indent': [ |
| 59 | + 'error', |
| 60 | + 4, |
| 61 | + { |
| 62 | + attribute: 1, |
| 63 | + closeBracket: 0, |
| 64 | + alignAttributesVertically: true, |
| 65 | + ignores: [], |
| 66 | + }, |
| 67 | + ], |
| 68 | + 'object-curly-spacing': ['error', 'always'], |
| 69 | + semi: ['error', 'never'], |
| 70 | + 'max-len': [ |
| 71 | + 'error', |
| 72 | + { |
| 73 | + comments: 180, |
| 74 | + code: 180, |
| 75 | + }, |
| 76 | + ], |
| 77 | + indent: [ |
| 78 | + 'error', |
| 79 | + 4, |
| 80 | + { |
| 81 | + SwitchCase: 1, |
| 82 | + VariableDeclarator: 1, |
| 83 | + outerIIFEBody: 1, |
| 84 | + }, |
| 85 | + ], |
| 86 | + 'comma-dangle': ['error', 'always-multiline'], |
| 87 | + 'vue/html-closing-bracket-spacing': 'error', |
| 88 | + 'vue/prop-name-casing': 'error', |
| 89 | + }, |
| 90 | + |
| 91 | + overrides: [ |
| 92 | + { |
| 93 | + files: ['**/*.spec.js'], |
| 94 | + rules: { 'import/no-extraneous-dependencies': 'off', 'no-debugger': 'off', 'no-console': 'off' }, |
| 95 | + env: { jest: true }, |
| 96 | + }, |
| 97 | + ], |
| 98 | +} |
0 commit comments