-
-
Notifications
You must be signed in to change notification settings - Fork 161
/
eslint.config.js
53 lines (51 loc) · 1.16 KB
/
eslint.config.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// @ts-check
import eslint from '@eslint/js';
import jestPlugin from 'eslint-plugin-jest';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default [
{
name: 'base ignore',
ignores: ['**/coverage/**', '**/dist/**', '**/node_modules/**'],
},
eslint.configs.recommended,
{
name: 'javascript',
files: ['**/*.js'],
languageOptions: {
globals: {
...globals.jquery,
...globals.browser,
},
},
},
...tseslint.configs.recommended,
{
name: 'typescript',
files: ['**/*.ts'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
globals: {
...globals.node,
...globals.jest,
},
},
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
name: 'jest',
files: ['**/*.test.{js,ts}'],
...jestPlugin.configs['flat/recommended'],
rules: {
'@typescript-eslint/no-unsafe-argument': 'off',
},
},
];