-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.mjs
45 lines (44 loc) · 1.1 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
import eslint from '@eslint/js';
import typescriptParser from '@typescript-eslint/parser';
import eslintPrettier from 'eslint-config-prettier';
import globals from 'globals';
import eslintTypescript from 'typescript-eslint';
export default eslintTypescript.config(
{
ignores: [
'.docusaurus/*',
'.docs/*',
'coverage/*',
'dist/*',
'docusaurus.config.js',
'node_modules/*',
],
},
eslint.configs.recommended,
...eslintTypescript.configs.recommended,
eslintPrettier,
{
files: ['**/*.js', '**/*.ts'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
parser: typescriptParser,
},
rules: {
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
],
'no-unused-vars': 'off',
'prefer-const': 'off',
},
},
);