|
| 1 | +import tsEslint from 'typescript-eslint'; |
| 2 | +import globals from 'globals'; |
| 3 | +import tsParser from '@typescript-eslint/parser'; |
| 4 | +import js from '@eslint/js'; |
| 5 | + |
| 6 | +export default [ |
| 7 | + js.configs.recommended, |
| 8 | + ...tsEslint.configs.recommended, |
| 9 | + { |
| 10 | + languageOptions: { |
| 11 | + globals: { |
| 12 | + ...globals.node, |
| 13 | + ...globals.commonjs, |
| 14 | + ...globals.jest |
| 15 | + }, |
| 16 | + |
| 17 | + parser: tsParser, |
| 18 | + ecmaVersion: 2018, |
| 19 | + sourceType: 'commonjs' |
| 20 | + }, |
| 21 | + |
| 22 | + rules: { |
| 23 | + camelcase: 'off', |
| 24 | + radix: ['error', 'as-needed'], |
| 25 | + // quotes: 'off', |
| 26 | + // 'require-jsdoc': 'off', |
| 27 | + // 'require-atomic-updates': 'off', |
| 28 | + |
| 29 | + '@typescript-eslint/camelcase': 'off', |
| 30 | + |
| 31 | + // remove after totally rewrite to ts |
| 32 | + '@typescript-eslint/no-var-requires': 'off', |
| 33 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 34 | + '@typescript-eslint/no-explicit-any': 'off', |
| 35 | + '@typescript-eslint/ban-ts-comment': 'warn', |
| 36 | + '@typescript-eslint/no-unused-expressions': 'off', |
| 37 | + '@typescript-eslint/no-unused-vars': [ |
| 38 | + 'error', |
| 39 | + { |
| 40 | + args: 'all', |
| 41 | + argsIgnorePattern: '^_', |
| 42 | + caughtErrors: 'all', |
| 43 | + caughtErrorsIgnorePattern: '^_', |
| 44 | + destructuredArrayIgnorePattern: '^_', |
| 45 | + varsIgnorePattern: '^_', |
| 46 | + ignoreRestSiblings: true |
| 47 | + } |
| 48 | + ] |
| 49 | + } |
| 50 | + } |
| 51 | +]; |
0 commit comments