|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + es2021: true, |
| 5 | + }, |
| 6 | + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], |
| 7 | + overrides: [], |
| 8 | + parser: '@typescript-eslint/parser', |
| 9 | + parserOptions: { |
| 10 | + ecmaVersion: 'latest', |
| 11 | + sourceType: 'module', |
| 12 | + }, |
| 13 | + plugins: ['@typescript-eslint'], |
| 14 | + rules: { |
| 15 | + 'func-call-spacing': 'error', |
| 16 | + 'func-name-matching': 'error', |
| 17 | + 'func-style': ['error', 'declaration', { allowArrowFunctions: true }], |
| 18 | + 'key-spacing': 'error', |
| 19 | + 'keyword-spacing': 'error', |
| 20 | + 'linebreak-style': 'error', |
| 21 | + 'max-len': ['error', { |
| 22 | + code: 120, |
| 23 | + ignorePattern: '^// Flags:', |
| 24 | + ignoreRegExpLiterals: true, |
| 25 | + ignoreTemplateLiterals: true, |
| 26 | + ignoreUrls: true, |
| 27 | + tabWidth: 2, |
| 28 | + }], |
| 29 | + 'no-confusing-arrow': 'error', |
| 30 | + 'no-constructor-return': 'error', |
| 31 | + 'no-duplicate-imports': 'error', |
| 32 | + 'no-return-await': 'error', |
| 33 | + 'no-self-compare': 'error', |
| 34 | + 'no-tabs': 'error', |
| 35 | + 'no-template-curly-in-string': 'error', |
| 36 | + 'no-throw-literal': 'error', |
| 37 | + 'no-trailing-spaces': 'error', |
| 38 | + 'no-undef': ['error', { typeof: true }], |
| 39 | + 'no-undef-init': 'error', |
| 40 | + 'no-unused-expressions': ['error', { allowShortCircuit: true }], |
| 41 | + "@typescript-eslint/consistent-type-definitions": ["error", "type"], |
| 42 | + 'no-unused-vars': 'off', |
| 43 | + '@typescript-eslint/no-unused-vars': 'error', |
| 44 | + 'no-use-before-define': ['error', { |
| 45 | + classes: true, |
| 46 | + functions: false, |
| 47 | + variables: false, |
| 48 | + }], |
| 49 | + 'no-useless-call': 'error', |
| 50 | + 'no-useless-concat': 'error', |
| 51 | + 'no-useless-constructor': 'error', |
| 52 | + 'no-useless-return': 'error', |
| 53 | + 'no-var': 'error', |
| 54 | + 'no-void': 'error', |
| 55 | + 'no-whitespace-before-property': 'error', |
| 56 | + 'object-curly-newline': 'error', |
| 57 | + 'object-curly-spacing': ['error', 'always'], |
| 58 | + 'one-var': ['error', { initialized: 'never' }], |
| 59 | + 'one-var-declaration-per-line': 'error', |
| 60 | + 'operator-linebreak': ['error', 'after'], |
| 61 | + 'padding-line-between-statements': [ |
| 62 | + 'error', |
| 63 | + { blankLine: 'always', prev: 'function', next: 'function' }, |
| 64 | + ], |
| 65 | + 'prefer-const': ['error', { ignoreReadBeforeAssign: true }], |
| 66 | + 'prefer-object-has-own': 'error', |
| 67 | + 'quotes': ['error', 'single', { avoidEscape: true }], |
| 68 | + 'quote-props': ['error', 'consistent'], |
| 69 | + 'rest-spread-spacing': 'error', |
| 70 | + 'semi': 'error', |
| 71 | + 'semi-spacing': 'error', |
| 72 | + 'strict': ['error', 'global'], |
| 73 | + 'jsdoc/require-jsdoc': 'off', |
| 74 | + 'jsdoc/require-param-description': 'off', |
| 75 | + 'jsdoc/newline-after-description': 'off', |
| 76 | + 'jsdoc/require-returns-description': 'off', |
| 77 | + 'jsdoc/valid-types': 'off', |
| 78 | + 'jsdoc/no-undefined-types': 'off', |
| 79 | + 'jsdoc/require-param': 'off', |
| 80 | + 'jsdoc/check-tag-names': 'off', |
| 81 | + 'jsdoc/require-returns': 'off', |
| 82 | + }, |
| 83 | +}; |
0 commit comments