1
1
import { FlatCompat } from '@eslint/eslintrc' ;
2
- import js from '@eslint/js' ;
3
2
import importX from 'eslint-plugin-import-x' ;
4
3
import * as mdx from 'eslint-plugin-mdx' ;
5
- import noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths' ;
6
4
import react from 'eslint-plugin-react' ;
7
5
import storybook from 'eslint-plugin-storybook' ;
8
6
import tseslint from 'typescript-eslint' ;
9
7
8
+ // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
9
+ import baseConfig from '../../eslint.config.js' ;
10
+
10
11
const compat = new FlatCompat ( ) ;
11
12
12
13
const compatConfig = compat . config ( {
@@ -20,62 +21,20 @@ const compatConfig = compat.config({
20
21
} ) ;
21
22
22
23
export default tseslint . config (
23
- {
24
- ignores : [
25
- 'node_modules' ,
26
- '.next' ,
27
- '.swc' ,
28
- '.turbo' ,
29
- 'build' ,
30
- 'coverage' ,
31
- 'global.d.ts' ,
32
- 'junit.xml' ,
33
- 'storybook-static/**' ,
34
- ] ,
35
- } ,
24
+ ...baseConfig ,
36
25
{
37
26
extends : [
38
- js . configs . recommended ,
39
- importX . flatConfigs . recommended ,
40
- importX . flatConfigs . typescript ,
41
27
react . configs . flat [ 'jsx-runtime' ] ,
42
28
...tseslint . configs . recommended ,
29
+ importX . flatConfigs . typescript ,
43
30
...compatConfig ,
44
31
] ,
45
32
files : [ '**/*.{js,md,mdx,mjs,ts,tsx}' ] ,
46
- plugins : {
47
- 'no-relative-import-paths' : noRelativeImportPaths ,
48
- } ,
49
33
rules : {
50
- '@next/next/no-duplicate-head' : 'off' ,
51
34
'@typescript-eslint/array-type' : [ 'error' , { default : 'generic' } ] ,
52
35
'@typescript-eslint/consistent-type-imports' : 'error' ,
53
36
'@typescript-eslint/no-require-imports' : 'off' ,
54
- 'import-x/namespace' : 'off' ,
55
- 'import-x/no-named-as-default-member' : 'off' ,
56
- 'import-x/no-unresolved' : 'off' ,
57
- 'import-x/order' : [
58
- 'error' ,
59
- {
60
- groups : [
61
- 'builtin' ,
62
- 'external' ,
63
- 'internal' ,
64
- [ 'sibling' , 'parent' ] ,
65
- 'index' ,
66
- 'unknown' ,
67
- ] ,
68
- 'newlines-between' : 'always' ,
69
- alphabetize : {
70
- order : 'asc' ,
71
- caseInsensitive : true ,
72
- } ,
73
- } ,
74
- ] ,
75
- 'no-relative-import-paths/no-relative-import-paths' : [
76
- 'warn' ,
77
- { allowSameFolder : true , prefix : '@' } ,
78
- ] ,
37
+ '@next/next/no-duplicate-head' : 'off' ,
79
38
} ,
80
39
settings : {
81
40
react : {
0 commit comments