1
- import { defineConfig } from "eslint/config" ;
2
- import typescriptEslint from "@typescript-eslint/eslint-plugin" ;
3
- import _import from "eslint-plugin-import" ;
4
- import { fixupPluginRules } from "@eslint/compat" ;
5
- import globals from "globals" ;
6
- import tsParser from "@typescript-eslint/parser" ;
7
- import path from "node:path" ;
8
- import { fileURLToPath } from "node:url" ;
9
1
import js from "@eslint/js" ;
10
- import { FlatCompat } from "@eslint/eslintrc" ;
11
-
12
- const __filename = fileURLToPath ( import . meta. url ) ;
13
- const __dirname = path . dirname ( __filename ) ;
14
- const compat = new FlatCompat ( {
15
- baseDirectory : __dirname ,
16
- recommendedConfig : js . configs . recommended ,
17
- allConfig : js . configs . all
18
- } ) ;
19
-
20
- export default defineConfig ( [ {
21
- extends : compat . extends ( "eslint:recommended" , "plugin:@typescript-eslint/recommended" ) ,
22
-
23
- plugins : {
24
- "@typescript-eslint" : typescriptEslint ,
25
- import : fixupPluginRules ( _import ) ,
26
- } ,
27
-
28
- languageOptions : {
29
- globals : {
30
- ...globals . node ,
31
- ...globals . sourceType ,
2
+ import tseslint from "typescript-eslint" ;
3
+
4
+ export default tseslint . config (
5
+ js . configs . recommended ,
6
+ ...tseslint . configs . recommended ,
7
+ {
8
+ files : [ "workbench/resources/js/**/*.{ts,tsx}" ] ,
9
+ rules : {
10
+ "no-duplicate-imports" : "error" ,
32
11
} ,
33
-
34
- parser : tsParser ,
35
- ecmaVersion : "latest" ,
36
- sourceType : "module" ,
37
- } ,
38
-
39
- rules : {
40
- "import/no-duplicates" : "error" ,
41
12
} ,
42
- } ] ) ;
13
+ ) ;
0 commit comments