Skip to content

Commit 4ffe3b9

Browse files
chore: Migrate to ESlint v9
1 parent f03b9bb commit 4ffe3b9

File tree

4 files changed

+244
-182
lines changed

4 files changed

+244
-182
lines changed

.eslintrc.cjs

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

eslint.config.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import js from '@eslint/js';
2+
import tsPlugin from '@typescript-eslint/eslint-plugin';
3+
import tsParser from '@typescript-eslint/parser';
4+
import globals from 'globals';
5+
6+
export default [
7+
{
8+
ignores: ['node_modules/**', 'dist/**'],
9+
},
10+
11+
// Base JS config for all files
12+
{
13+
...js.configs.recommended,
14+
files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
15+
languageOptions: {
16+
globals: { ...globals.node }, // Add Node.js globals
17+
},
18+
},
19+
20+
// TypeScript specific config
21+
{
22+
files: ['**/*.ts', '**/*.tsx'],
23+
plugins: {
24+
'@typescript-eslint': tsPlugin,
25+
},
26+
languageOptions: {
27+
parser: tsParser,
28+
parserOptions: {
29+
project: ['./tsconfig.json', './tsconfig.node.json'],
30+
ecmaVersion: 'latest',
31+
sourceType: 'module',
32+
},
33+
},
34+
rules: {
35+
...tsPlugin.configs.recommended.rules,
36+
},
37+
},
38+
];

0 commit comments

Comments
 (0)