Skip to content

Commit e0b04ef

Browse files
fix: Update ESLint configuration to use TypeScript ESLint and improve rule settings
1 parent 33b2920 commit e0b04ef

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

eslint.config.mjs

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
import js from '@eslint/js';
2-
import tsEslint from 'typescript-eslint';
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
33

4-
export default [
5-
js.configs.recommended,
6-
...tsEslint.configs.recommended,
7-
{
8-
ignores: [
9-
"dist/",
10-
"dist-esm/",
11-
"docs/",
12-
"tests/",
13-
"node_modules/"
14-
]
15-
},
16-
{
17-
files: ["**/*.ts"],
18-
rules: {
19-
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
20-
}
21-
}
22-
];
4+
export default tseslint.config(
5+
eslint.configs.recommended,
6+
...tseslint.configs.recommended,
7+
{
8+
rules: {
9+
"semi": ["warn", "always"],
10+
"indent": ["warn", "tab", { "SwitchCase": 1 }],
11+
"@typescript-eslint/no-explicit-any": "off"
12+
},
13+
files: ['src/**/*.ts'],
14+
languageOptions: {
15+
ecmaVersion: 2022,
16+
sourceType: 'module',
17+
globals: {
18+
console: 'readonly',
19+
process: 'readonly'
20+
}
21+
}
22+
}
23+
);

0 commit comments

Comments
 (0)