/** * @type {import('eslint').ESLint.ConfigData} */ module.exports = { plugins: ['@typescript-eslint'], extends: [require.resolve('./js.js'), 'plugin:import/typescript', 'plugin:@typescript-eslint/recommended'], settings: { 'import/resolver': { typescript: { project: ['tsconfig.json', 'packages/*/tsconfig.json', 'examples/*/tsconfig.json', 'docs/*/tsconfig.json'] } } }, overrides: [ { files: ['*.ts', '*.tsx', '*.mts', '*.cts'], parser: '@typescript-eslint/parser' }, { files: ['*.js', '*.mjs', '*.cjs', '*.cts'], rules: { '@typescript-eslint/no-var-requires': 'off' } } ], rules: { // TS '@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', disallowTypeAnnotations: false }], '@typescript-eslint/no-empty-interface': [ 'error', { allowSingleExtends: true } ], // Override JS 'no-redeclare': 'off', '@typescript-eslint/no-redeclare': 'error', 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': [ 'error', { vars: 'all', args: 'all', ignoreRestSiblings: false, varsIgnorePattern: '^_', argsIgnorePattern: '^_' } ], 'no-use-before-define': 'off', '@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: true }], 'no-shadow': 'off', '@typescript-eslint/no-shadow': 'error', // off '@typescript-eslint/consistent-type-definitions': 'off', '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-non-null-assertion': 'off' } };