|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + rules: { |
| 4 | + indent: 'off', |
| 5 | + 'no-unused-vars': 'off', |
| 6 | + semi: [2, 'always'], |
| 7 | + 'keyword-spacing': [2, { before: true, after: true }], |
| 8 | + 'space-before-blocks': [2, 'always'], |
| 9 | + 'no-mixed-spaces-and-tabs': [2, 'smart-tabs'], |
| 10 | + 'no-cond-assign': 0, |
| 11 | + 'object-shorthand': [2, 'always'], |
| 12 | + 'no-const-assign': 2, |
| 13 | + 'no-class-assign': 2, |
| 14 | + 'no-this-before-super': 2, |
| 15 | + 'no-var': 2, |
| 16 | + 'no-unreachable': 2, |
| 17 | + 'valid-typeof': 2, |
| 18 | + 'quote-props': [2, 'as-needed'], |
| 19 | + 'one-var': [2, 'never'], |
| 20 | + 'prefer-arrow-callback': 2, |
| 21 | + 'prefer-const': [2, { destructuring: 'all' }], |
| 22 | + 'arrow-spacing': 2, |
| 23 | + 'no-inner-declarations': 0, |
| 24 | + 'require-atomic-updates': 'off', |
| 25 | + '@typescript-eslint/indent': [ |
| 26 | + 'error', |
| 27 | + 'tab', |
| 28 | + { |
| 29 | + SwitchCase: 1, |
| 30 | + ignoredNodes: ['TemplateLiteral'] |
| 31 | + } |
| 32 | + ], |
| 33 | + '@typescript-eslint/camelcase': 'off', |
| 34 | + '@typescript-eslint/no-use-before-define': 'off', |
| 35 | + '@typescript-eslint/array-type': ['error', 'array-simple'], |
| 36 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 37 | + '@typescript-eslint/no-explicit-any': 'off', |
| 38 | + '@typescript-eslint/explicit-member-accessibility': 'off', |
| 39 | + '@typescript-eslint/no-unused-vars': [ |
| 40 | + 'error', |
| 41 | + { |
| 42 | + argsIgnorePattern: '^_' |
| 43 | + } |
| 44 | + ], |
| 45 | + '@typescript-eslint/no-object-literal-type-assertion': [ |
| 46 | + 'error', |
| 47 | + { |
| 48 | + allowAsParameter: true |
| 49 | + } |
| 50 | + ], |
| 51 | + '@typescript-eslint/no-unused-vars': 'off' |
| 52 | + }, |
| 53 | + globals: { |
| 54 | + globalThis: false |
| 55 | + }, |
| 56 | + env: { |
| 57 | + es6: true, |
| 58 | + browser: true, |
| 59 | + node: true, |
| 60 | + mocha: true |
| 61 | + }, |
| 62 | + extends: [ |
| 63 | + 'eslint:recommended', |
| 64 | + 'plugin:import/errors', |
| 65 | + 'plugin:import/warnings', |
| 66 | + 'plugin:import/typescript', |
| 67 | + 'plugin:@typescript-eslint/recommended' |
| 68 | + ], |
| 69 | + parserOptions: { |
| 70 | + ecmaVersion: 9, |
| 71 | + sourceType: 'module' |
| 72 | + }, |
| 73 | + plugins: ['svelte3'], |
| 74 | + settings: { |
| 75 | + 'import/core-modules': [ |
| 76 | + 'svelte', |
| 77 | + 'svelte/internal', |
| 78 | + 'svelte/store', |
| 79 | + 'svelte/easing', |
| 80 | + 'estree' |
| 81 | + ], |
| 82 | + 'svelte3/compiler': require('./compiler') |
| 83 | + }, |
| 84 | + overrides: [ |
| 85 | + { |
| 86 | + files: ['*.js'], |
| 87 | + rules: { |
| 88 | + '@typescript-eslint/no-var-requires': 'off' |
| 89 | + } |
| 90 | + }, |
| 91 | + { |
| 92 | + files: ['*.svelte'], |
| 93 | + processor: 'svelte3/svelte3', |
| 94 | + rules: { |
| 95 | + '@typescript-eslint/indent': 'off' |
| 96 | + } |
| 97 | + } |
| 98 | + ] |
| 99 | +}; |
0 commit comments