|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + node: true, |
| 5 | + }, |
| 6 | + extends: [ |
| 7 | + 'airbnb-base', |
| 8 | + 'eslint:recommended', |
| 9 | + 'plugin:vue/essential', |
| 10 | + ], |
| 11 | + globals: { |
| 12 | + socket: true, |
| 13 | + PDFObject: true, |
| 14 | + }, |
| 15 | + overrides: [ |
| 16 | + { |
| 17 | + files: [ |
| 18 | + '**/*.spec.{j,t}s?(x)', |
| 19 | + ], |
| 20 | + env: { |
| 21 | + jest: true, |
| 22 | + }, |
| 23 | + }, |
| 24 | + ], |
| 25 | + parser: 'vue-eslint-parser', |
| 26 | + parserOptions: { |
| 27 | + parser: '@babel/eslint-parser', |
| 28 | + ecmaVersion: 12, |
| 29 | + sourceType: 'module', |
| 30 | + }, |
| 31 | + plugins: [ |
| 32 | + 'import', |
| 33 | + 'vue', |
| 34 | + '@babel', |
| 35 | + ], |
| 36 | + settings: { |
| 37 | + 'import/resolver': { |
| 38 | + 'babel-module': {}, |
| 39 | + }, |
| 40 | + }, |
| 41 | + rules: { |
| 42 | + 'brace-style': ['error', 'stroustrup'], |
| 43 | + 'default-case': [ |
| 44 | + 'error', { |
| 45 | + commentPattern: '^skip\\sdefault', |
| 46 | + }, |
| 47 | + ], |
| 48 | + 'func-names': ['error', 'never'], |
| 49 | + 'function-paren-newline': 0, |
| 50 | + 'import/no-self-import': 0, |
| 51 | + 'import/no-extraneous-dependencies': 0, |
| 52 | + 'implicit-arrow-linebreak': ['warn', 'beside'], |
| 53 | + indent: [2, 'tab', { SwitchCase: 1 }], |
| 54 | + 'no-tabs': [0, { allowIndentationTabs: true }], |
| 55 | + 'linebreak-style': 0, |
| 56 | + 'max-len': 0, |
| 57 | + 'no-else-return': ['error', { allowElseIf: true }], |
| 58 | + 'no-console': ['warn', { allow: ['warn', 'error', 'info'] }], |
| 59 | + 'no-debugger': 0, |
| 60 | + 'no-new': 0, |
| 61 | + 'no-unused-vars': 1, |
| 62 | + 'no-use-before-define': 0, |
| 63 | + 'no-useless-escape': 0, |
| 64 | + 'no-param-reassign': [ |
| 65 | + 'error', { |
| 66 | + props: true, |
| 67 | + ignorePropertyModificationsFor: ['field', 'model', 'el', 'item', 'state', 'Vue', 'vue'], |
| 68 | + }, |
| 69 | + ], |
| 70 | + 'no-underscore-dangle': [ |
| 71 | + 'error', { |
| 72 | + allow: ['_data'], |
| 73 | + allowAfterThis: true, |
| 74 | + }, |
| 75 | + ], |
| 76 | + 'no-plusplus': [ |
| 77 | + 'error', { allowForLoopAfterthoughts: true }, |
| 78 | + ], |
| 79 | + 'object-curly-newline': ['error', { |
| 80 | + ObjectPattern: { multiline: false }, |
| 81 | + }], |
| 82 | + 'operator-linebreak': ['error', 'after'], |
| 83 | + 'prefer-destructuring': [ |
| 84 | + 'error', { |
| 85 | + array: false, |
| 86 | + object: false, |
| 87 | + }, |
| 88 | + { |
| 89 | + enforceForRenamedProperties: false, |
| 90 | + }, |
| 91 | + ], |
| 92 | + 'space-before-function-paren': ['error', { |
| 93 | + anonymous: 'never', |
| 94 | + named: 'never', |
| 95 | + asyncArrow: 'never', |
| 96 | + }], |
| 97 | + 'vue/html-closing-bracket-newline': 0, |
| 98 | + 'vue/html-indent': 0, |
| 99 | + 'vue/html-self-closing': 0, |
| 100 | + 'vue/max-attributes-per-line': 0, |
| 101 | + 'vue/no-template-shadow': 0, |
| 102 | + 'vue/no-v-html': 0, |
| 103 | + 'vue/singleline-html-element-content-newline': 0, |
| 104 | + }, |
| 105 | +}; |
0 commit comments