Skip to content

Commit c8cb2ab

Browse files
committed
chore: adjust ESLint config to use modern definition
Taken from: https://typescript-eslint.io/getting-started
1 parent 986c01a commit c8cb2ab

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

eslint.config.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
import js from '@eslint/js';
2-
import tsparser from '@typescript-eslint/parser';
3-
import tseslint from '@typescript-eslint/eslint-plugin';
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import { defineConfig } from 'eslint/config';
5+
import tseslint from 'typescript-eslint';
46
import globals from 'globals';
57
import importPlugin from 'eslint-plugin-import';
68
import react from 'eslint-plugin-react';
79

8-
export default tseslint.config(
910
// Global ignores (no changes here)
11+
export default defineConfig(
1012
{
1113
ignores: [
1214
'**/node_modules/**',
@@ -24,14 +26,13 @@ export default tseslint.config(
2426
},
2527

2628
// Base recommended configurations
27-
js.configs.recommended,
29+
eslint.configs.recommended,
2830
...tseslint.configs.recommended,
2931

3032
// Main configuration object
3133
{
3234
files: ['**/*.ts', '**/*.tsx'],
3335
languageOptions: {
34-
parser: tsparser,
3536
globals: { ...globals.node, ...globals.es2021, ...globals.bun },
3637
},
3738
plugins: {

0 commit comments

Comments
 (0)