|
| 1 | +import globals from 'globals'; |
| 2 | +import js from '@eslint/js'; |
| 3 | + |
| 4 | +export default [ |
| 5 | + js.configs.recommended, |
| 6 | + { |
| 7 | + ignores: ['resources/**/*-stub.js', 'resources/**/*.ts'], |
| 8 | + }, { |
| 9 | + languageOptions: { |
| 10 | + globals: { |
| 11 | + ...globals.browser, |
| 12 | + }, |
| 13 | + |
| 14 | + ecmaVersion: 'latest', |
| 15 | + sourceType: 'module', |
| 16 | + }, |
| 17 | + |
| 18 | + rules: { |
| 19 | + indent: ['error', 4], |
| 20 | + 'arrow-parens': ['error', 'as-needed'], |
| 21 | + |
| 22 | + 'padded-blocks': ['error', { |
| 23 | + blocks: 'never', |
| 24 | + classes: 'always', |
| 25 | + }], |
| 26 | + |
| 27 | + 'object-curly-spacing': ['error', 'never'], |
| 28 | + |
| 29 | + 'space-before-function-paren': ['error', { |
| 30 | + anonymous: 'never', |
| 31 | + named: 'never', |
| 32 | + asyncArrow: 'always', |
| 33 | + }], |
| 34 | + |
| 35 | + 'import/prefer-default-export': 'off', |
| 36 | + |
| 37 | + 'no-plusplus': ['error', { |
| 38 | + allowForLoopAfterthoughts: true, |
| 39 | + }], |
| 40 | + |
| 41 | + 'arrow-body-style': 'off', |
| 42 | + 'no-restricted-syntax': 'off', |
| 43 | + 'no-continue': 'off', |
| 44 | + 'prefer-destructuring': 'off', |
| 45 | + 'class-methods-use-this': 'off', |
| 46 | + 'no-param-reassign': 'off', |
| 47 | + |
| 48 | + 'no-console': ['warn', { |
| 49 | + allow: ['error', 'warn'], |
| 50 | + }], |
| 51 | + |
| 52 | + 'no-new': 'off', |
| 53 | + |
| 54 | + 'max-len': ['error', { |
| 55 | + code: 110, |
| 56 | + tabWidth: 4, |
| 57 | + ignoreUrls: true, |
| 58 | + ignoreComments: false, |
| 59 | + ignoreRegExpLiterals: true, |
| 60 | + ignoreStrings: true, |
| 61 | + ignoreTemplateLiterals: true, |
| 62 | + }], |
| 63 | + }, |
| 64 | + }]; |
0 commit comments