-
Notifications
You must be signed in to change notification settings - Fork 6
/
eslint.config.mjs
29 lines (27 loc) · 970 Bytes
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import pluginJs from '@eslint/js';
import configPrettier from 'eslint-config-prettier';
import pluginTypescript from 'typescript-eslint';
for (const config of pluginTypescript.configs.recommendedTypeChecked) {
config.files = ['**/*.{ts,tsx,mts,cts}']; // ensure config only targets TypeScript files
}
/** @type {import('eslint').Linter.Config[]} */
export default [
{ ignores: ['dist/', 'fixtures/', '.vscode-test/'] },
pluginJs.configs.recommended,
{
rules: {
'no-undef': 'off',
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
},
},
...pluginTypescript.configs.recommendedTypeChecked,
{ languageOptions: { parserOptions: { projectService: true } } },
{
files: ['**/*.{ts,tsx,mts,cts}'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
},
},
configPrettier,
];