|
| 1 | +// @ts-check |
| 2 | + |
| 3 | +import eslint from '@eslint/js'; |
| 4 | +import tsEslint from 'typescript-eslint'; |
| 5 | +import globals from 'globals'; |
| 6 | + |
| 7 | +export default tsEslint.config( |
| 8 | + eslint.configs.recommended, |
| 9 | + ...tsEslint.configs.recommended, |
| 10 | + { |
| 11 | + ignores: ['**/*.d.ts', '**/node_modules/**', 'lib/**/*.js'], |
| 12 | + }, |
| 13 | + { |
| 14 | + languageOptions: { |
| 15 | + ecmaVersion: 2023, |
| 16 | + sourceType: 'commonjs', |
| 17 | + globals: { |
| 18 | + ...globals.node, |
| 19 | + }, |
| 20 | + }, |
| 21 | + rules: { |
| 22 | + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs |
| 23 | + quotes: ['warn', 'single', { avoidEscape: true }], |
| 24 | + |
| 25 | + // e.g. "@typescript-eslint/explicit-function-return-type": "off", |
| 26 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 27 | + '@typescript-eslint/no-use-before-define': 'off', |
| 28 | + '@typescript-eslint/no-empty-interface': 'off', |
| 29 | + '@typescript-eslint/no-inferrable-types': 'off', |
| 30 | + '@typescript-eslint/no-empty-function': 'off', |
| 31 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 32 | + '@typescript-eslint/no-explicit-any': 'off', |
| 33 | + '@typescript-eslint/no-unused-vars': ['warn', { ignoreRestSiblings: true, argsIgnorePattern: '^_' }], |
| 34 | + }, |
| 35 | + }, |
| 36 | +); |
0 commit comments