|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: false, |
| 4 | + es2020: true, |
| 5 | + jest: true, |
| 6 | + node: true, |
| 7 | + }, |
| 8 | + extends: [ 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended' ], |
| 9 | + parser: '@typescript-eslint/parser', |
| 10 | + plugins: ['@typescript-eslint'], |
| 11 | + settings: { |
| 12 | + 'import/resolver': { |
| 13 | + node: {}, |
| 14 | + typescript: { |
| 15 | + project: './tsconfig.es.json', |
| 16 | + alwaysTryTypes: true, |
| 17 | + }, |
| 18 | + }, |
| 19 | + }, |
| 20 | + rules: { |
| 21 | + '@typescript-eslint/ban-ts-ignore': ['off'], |
| 22 | + '@typescript-eslint/camelcase': ['off'], |
| 23 | + '@typescript-eslint/explicit-function-return-type': [ 'error', { allowExpressions: true } ], |
| 24 | + '@typescript-eslint/explicit-member-accessibility': 'error', |
| 25 | + '@typescript-eslint/indent': [ 'error', 2, { SwitchCase: 1 } ], |
| 26 | + '@typescript-eslint/interface-name-prefix': ['off'], |
| 27 | + '@typescript-eslint/member-delimiter-style': [ 'error', { multiline: { delimiter: 'none' } } ], |
| 28 | + '@typescript-eslint/member-ordering': [ |
| 29 | + 'error', |
| 30 | + { |
| 31 | + default: { |
| 32 | + memberTypes: [ |
| 33 | + 'signature', |
| 34 | + 'public-field', // = ["public-static-field", "public-instance-field"] |
| 35 | + 'protected-field', // = ["protected-static-field", "protected-instance-field"] |
| 36 | + 'private-field', // = ["private-static-field", "private-instance-field"] |
| 37 | + 'constructor', |
| 38 | + 'public-method', // = ["public-static-method", "public-instance-method"] |
| 39 | + 'protected-method', // = ["protected-static-method", "protected-instance-method"] |
| 40 | + 'private-method', // = ["private-static-method", "private-instance-method"] |
| 41 | + ], |
| 42 | + order: 'alphabetically', |
| 43 | + }, |
| 44 | + }, |
| 45 | + ], |
| 46 | + '@typescript-eslint/no-explicit-any': 'error', |
| 47 | + '@typescript-eslint/no-inferrable-types': ['off'], |
| 48 | + '@typescript-eslint/no-unused-vars': [ 'error', { argsIgnorePattern: '^_' } ], |
| 49 | + '@typescript-eslint/no-use-before-define': ['off'], |
| 50 | + '@typescript-eslint/semi': [ 'error', 'always' ], |
| 51 | + 'array-bracket-spacing': [ 'error', 'always', { singleValue: false } ], |
| 52 | + 'arrow-body-style': [ 'error', 'as-needed' ], |
| 53 | + 'computed-property-spacing': [ 'error', 'never' ], |
| 54 | + 'func-style': [ 'warn', 'expression' ], |
| 55 | + indent: [ 'error', 2, { SwitchCase: 1 } ], |
| 56 | + 'keyword-spacing': 'error', |
| 57 | + 'newline-before-return': 2, |
| 58 | + 'no-console': 0, |
| 59 | + 'no-multi-spaces': [ 'error', { ignoreEOLComments: false } ], |
| 60 | + 'no-multiple-empty-lines': [ 'error', { max: 1, maxBOF: 0 } ], |
| 61 | + 'no-throw-literal': 'error', |
| 62 | + 'object-curly-spacing': [ 'error', 'always' ], |
| 63 | + 'prefer-arrow-callback': 'error', |
| 64 | + quotes: [ 'error', 'single', { allowTemplateLiterals: true } ], |
| 65 | + semi: [ 'error', 'always' ] |
| 66 | + }, |
| 67 | +}; |
0 commit comments