-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
56 lines (55 loc) · 1.46 KB
/
eslint.config.js
File metadata and controls
56 lines (55 loc) · 1.46 KB
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
54
55
56
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
export default [
{
ignores: ['coverage/**', 'node_modules/**', 'dist/**', 'dist-scripts/**', 'website/.docusaurus/**', 'website/build/**'],
},
{
files: ['**/*.ts'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: tsParser,
parserOptions: {
project: ['./tsconfig.json', './tsconfig.test.json', './tsconfig.scripts.json'],
},
globals: {
Buffer: 'readonly',
clearInterval: 'readonly',
clearTimeout: 'readonly',
console: 'readonly',
fetch: 'readonly',
process: 'readonly',
setInterval: 'readonly',
setTimeout: 'readonly',
},
},
plugins: {
'@typescript-eslint': tsPlugin,
},
rules: {
eqeqeq: ['error', 'always'],
'no-var': 'error',
'prefer-const': 'error',
'@typescript-eslint/no-unused-vars': ['error', {
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
}],
'@typescript-eslint/no-explicit-any': 'warn',
},
},
{
files: ['src/__tests__/**/*.ts'],
languageOptions: {
globals: {
afterEach: 'readonly',
beforeEach: 'readonly',
describe: 'readonly',
expect: 'readonly',
it: 'readonly',
vi: 'readonly',
},
},
},
];