Skip to content

Commit 17f42a1

Browse files
committed
Upgrade config of eslint following up commit d40fdee
1 parent d40fdee commit 17f42a1

File tree

3 files changed

+87
-63
lines changed

3 files changed

+87
-63
lines changed

.eslintignore

Lines changed: 0 additions & 39 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 24 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
import eslint from '@eslint/js';
2+
import globals from 'globals';
3+
import tseslint from 'typescript-eslint';
4+
5+
export default [
6+
eslint.configs.recommended,
7+
...tseslint.configs.recommended,
8+
{
9+
files: [
10+
'src/**/*.js',
11+
'test/**/*.js',
12+
'src/**/*.mjs',
13+
'test/**/*.mjs',
14+
'src/**/*.ts',
15+
'test/**/*.ts',
16+
],
17+
},
18+
{
19+
languageOptions: {
20+
globals: { ...globals.node },
21+
},
22+
},
23+
{
24+
ignores: [
25+
// dependencies
26+
'node_modules/',
27+
28+
// runtime data
29+
'pids',
30+
'*.pid',
31+
'*.seed',
32+
33+
// dev-tools
34+
'*.js',
35+
36+
// testing
37+
'coverage/',
38+
39+
// keys
40+
'*.pem',
41+
42+
// production
43+
'build/',
44+
'release/',
45+
'dist/',
46+
'dll/',
47+
'.eslintcache',
48+
49+
// debug
50+
'.idea',
51+
'npm-debug.log*',
52+
'yarn-debug.log*',
53+
'yarn-error.log*',
54+
55+
// logs
56+
'logs/',
57+
'*.log',
58+
59+
// misc
60+
'.DS_Store',
61+
'.env*',
62+
'*.env',
63+
'.vscode/',
64+
'placeholder_*',
65+
],
66+
},
67+
{
68+
rules: {
69+
eqeqeq: 'warn',
70+
semi: 'warn',
71+
'no-mixed-spaces-and-tabs': 'warn',
72+
'no-extra-semi': 'error',
73+
'no-unreachable': 'warn',
74+
'no-unused-vars': 'off',
75+
'@typescript-eslint/no-require-imports': 'off',
76+
'@typescript-eslint/no-explicit-any': 'off',
77+
'@typescript-eslint/no-unused-vars': [
78+
'error',
79+
{
80+
argsIgnorePattern: '^_',
81+
varsIgnorePattern: '^_',
82+
caughtErrorsIgnorePattern: '^_',
83+
},
84+
],
85+
},
86+
},
87+
];

0 commit comments

Comments
 (0)