1- import js from "@eslint/js" ;
2- import react from "@eslint-react/eslint-plugin" ;
3- import reactHooks from "eslint-plugin-react-hooks" ;
4- import reactRefresh from "eslint-plugin-react-refresh" ;
5- import parser from "@babel/eslint-parser" ;
1+ import eslintJs from "@eslint/js" ;
2+ import eslintReact from "@eslint-react/eslint-plugin" ;
3+ import eslintPluginReactHooks from "eslint-plugin-react-hooks" ;
4+ import eslintPluginReactRefresh from "eslint-plugin-react-refresh" ;
5+ import babelEslintParser from "@babel/eslint-parser" ;
66import globals from "globals" ;
77
88import JSCONFIG from "./jsconfig.json" with { type : "json" } ;
@@ -16,7 +16,7 @@ export default [
1616 globals : {
1717 ...globals . browser ,
1818 } ,
19- parser,
19+ parser : babelEslintParser ,
2020 parserOptions : {
2121 requireConfigFile : false ,
2222 babelOptions : {
@@ -27,7 +27,7 @@ export default [
2727 } ,
2828 } ,
2929 rules : {
30- ...js . configs . recommended . rules ,
30+ ...eslintJs . configs . recommended . rules ,
3131 } ,
3232 } ,
3333 // base configuration for node environment source files (*.config.js, etc.)
@@ -38,7 +38,7 @@ export default [
3838 globals : {
3939 ...globals . node ,
4040 } ,
41- parser,
41+ parser : babelEslintParser ,
4242 parserOptions : {
4343 requireConfigFile : false ,
4444 babelOptions : {
@@ -49,28 +49,28 @@ export default [
4949 } ,
5050 } ,
5151 rules : {
52- ...js . configs . recommended . rules ,
52+ ...eslintJs . configs . recommended . rules ,
5353 "no-console" : "off" ,
5454 } ,
5555 } ,
5656 // React configuration
5757 {
5858 files : JSCONFIG . include ,
59- ...react . configs . recommended ,
59+ ...eslintReact . configs . recommended ,
6060 } ,
6161 // React Hooks configuration
6262 {
6363 files : JSCONFIG . include ,
6464 plugins : {
65- "react-hooks" : reactHooks ,
65+ "react-hooks" : eslintPluginReactHooks ,
6666 } ,
67- rules : reactHooks . configs . recommended . rules ,
67+ rules : eslintPluginReactHooks . configs . recommended . rules ,
6868 } ,
6969 // React Refresh configuration
7070 {
7171 files : JSCONFIG . include ,
7272 plugins : {
73- "react-refresh" : reactRefresh ,
73+ "react-refresh" : eslintPluginReactRefresh ,
7474 } ,
7575 rules : {
7676 "react-refresh/only-export-components" : "warn" ,
0 commit comments