-
Notifications
You must be signed in to change notification settings - Fork 10
/
eslint.config.mjs
53 lines (51 loc) · 1.14 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import pluginJs from '@eslint/js';
import pluginReact from 'eslint-plugin-react';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default [
{
ignores: [
'**/*.svg',
'documentation/',
'website/',
'build/',
'scripts',
'test-results',
'coverage/',
],
},
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
},
pluginJs.configs.recommended,
...tseslint.configs.strict,
...tseslint.configs.stylistic,
pluginReact.configs.flat['jsx-runtime'],
{
languageOptions: {
globals: globals.browser,
},
},
{
settings: { react: { version: '18.3' } },
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-dynamic-delete': 'off',
'@typescript-eslint/prefer-for-of': 'off',
},
languageOptions: {
globals: {
it: 'readonly',
describe: 'readonly',
expect: 'readonly',
vi: 'readonly',
beforeEach: 'readonly',
global: 'readonly',
},
},
},
];