@@ -7,6 +7,7 @@ import tsParser from '@typescript-eslint/parser';
77import globals from 'globals' ;
88import path from 'node:path' ;
99import { fileURLToPath } from 'node:url' ;
10+ import eslintPluginReact from 'eslint-plugin-react' ;
1011
1112const __filename = fileURLToPath ( import . meta. url ) ;
1213const __dirname = path . dirname ( __filename ) ;
@@ -18,6 +19,7 @@ const compat = new FlatCompat({
1819
1920export default [
2021 {
22+ files : [ 'src/**/*.{js,mjs,cjs,ts,jsx,tsx}' ] ,
2123 ignores : [
2224 '**/node_modules' ,
2325 '**/.github' ,
@@ -51,15 +53,15 @@ export default [
5153 } ,
5254 languageOptions : {
5355 globals : {
54- ...globals . browser ,
56+ ...globals . es2023 ,
5557 ...globals . jest ,
5658 ...globals . node ,
5759 __DEV__ : 'readonly' ,
5860 } ,
5961 parser : tsParser ,
6062 parserOptions : {
6163 project : [ './tsconfig.json' ] ,
62- tsconfigRootDir : __dirname ,
64+ tsconfigRootDir : import . meta . dirname ,
6365 } ,
6466 } ,
6567 settings : {
@@ -74,26 +76,17 @@ export default [
7476 } ,
7577 rules : {
7678 'import/no-cycle' : 'off' ,
77-
79+ 'import/no-unresolved' : [ 'error' ] ,
7880 'import/extensions' : [
7981 'error' ,
8082 'ignorePackages' ,
8183 {
8284 js : 'never' ,
83- mjs : 'never' ,
8485 jsx : 'never' ,
8586 ts : 'never' ,
8687 tsx : 'never' ,
8788 } ,
8889 ] ,
89-
90- 'import/no-unresolved' : [
91- 'error' ,
92- {
93- ignore : [ '^(part|all):' ] ,
94- } ,
95- ] ,
96-
9790 'import/order' : [
9891 'error' ,
9992 {
@@ -119,7 +112,6 @@ export default [
119112 'react/function-component-definition' : 'off' ,
120113 'import/prefer-default-export' : 'off' ,
121114 'no-unsafe-finally' : 'off' ,
122-
123115 '@typescript-eslint/no-unused-vars' : [
124116 'error' ,
125117 {
@@ -152,7 +144,6 @@ export default [
152144 '@next/next/no-img-element' : 'off' ,
153145 'react/jsx-props-no-spreading' : 'off' ,
154146 'jsx-a11y/anchor-is-valid' : 'off' ,
155-
156147 'comma-dangle' : [ 'error' , 'always-multiline' ] ,
157148 'consistent-return' : 0 ,
158149 'function-paren-newline' : 0 ,
@@ -169,7 +160,6 @@ export default [
169160 'object-curly-spacing' : [ 'error' , 'always' ] ,
170161 'operator-linebreak' : 0 ,
171162 'quote-props' : 0 ,
172-
173163 'react-hooks/rules-of-hooks' : 'error' ,
174164 'react/jsx-wrap-multilines' : [
175165 'error' ,
@@ -178,12 +168,10 @@ export default [
178168 'react/react-in-jsx-scope' : 0 ,
179169 semi : [ 'error' , 'always' ] ,
180170 'spaced-comment' : 0 ,
181-
182171 'react/prop-types' : 'off' ,
183172 'import/no-extraneous-dependencies' : 'off' ,
184173 'react/require-default-props' : 'off' ,
185174 'react/state-in-constructor' : 'off' ,
186-
187175 'react/no-unescaped-entities' : [
188176 'error' ,
189177 {
0 commit comments