-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy patheslint.config.mjs
More file actions
55 lines (54 loc) · 1.33 KB
/
eslint.config.mjs
File metadata and controls
55 lines (54 loc) · 1.33 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
import eslint from '@eslint/js';
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
import globals from 'globals';
import nPlugin from 'eslint-plugin-n';
import prettierPluginRecommended from 'eslint-plugin-prettier/recommended';
import unusedImports from 'eslint-plugin-unused-imports';
export default defineConfig(
eslint.configs.recommended,
tseslint.configs.recommended,
prettierPluginRecommended,
{
plugins: {
n: nPlugin,
'unused-imports': unusedImports
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.node
}
},
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_'
}
],
'n/prefer-node-protocol': 'warn',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_'
}
]
}
},
{
files: ['test/**/*.ts'],
rules: {
'@typescript-eslint/no-unused-vars': 'off'
}
}
);