@@ -2,19 +2,23 @@ import js from '@eslint/js';
22import globals from 'globals' ;
33import reactHooks from 'eslint-plugin-react-hooks' ;
44import reactRefresh from 'eslint-plugin-react-refresh' ;
5+
56import prettier from 'eslint-plugin-prettier' ;
67import importPlugin from 'eslint-plugin-import' ;
78
89const config = [
910 { ignores : [ 'dist' , 'eslint.config.js' ] } ,
11+
1012 {
1113 files : [ '**/*.{js,jsx}' ] ,
1214 languageOptions : {
1315 ecmaVersion : 2020 ,
16+
1417 globals : {
1518 ...globals . browser ,
1619 ...globals . node ,
1720 } ,
21+
1822 parserOptions : {
1923 ecmaVersion : 'latest' ,
2024 ecmaFeatures : { jsx : true } ,
@@ -24,21 +28,26 @@ const config = [
2428 plugins : {
2529 'react-hooks' : reactHooks ,
2630 'react-refresh' : reactRefresh ,
31+
2732 prettier : prettier ,
2833 import : importPlugin ,
34+
2935 } ,
3036 rules : {
3137 ...js . configs . recommended . rules ,
3238 ...reactHooks . configs . recommended . rules ,
3339
40+
3441 'no-unused-vars' : [ 'warn' , { varsIgnorePattern : '^[A-Z_]' } ] ,
3542 'no-console' : 'warn' ,
3643 'prefer-const' : 'warn' ,
3744
45+
3846 'react-refresh/only-export-components' : [
3947 'warn' ,
4048 { allowConstantExport : true } ,
4149 ] ,
50+
4251 'react-hooks/rules-of-hooks' : 'warn' ,
4352
4453 'prettier/prettier' : [ 'warn' , { } , { usePrettierrc : true } ] ,
0 commit comments