11import react from "@eslint-react/eslint-plugin" ;
22import { includeIgnoreFile } from "@eslint/compat" ;
3- import markdown from "@eslint/markdown" ;
43import { disableTypeChecked , strictTypeChecked } from "@local/configs/eslint" ;
54import { recommended as fastImportRecommended } from "eslint-plugin-fast-import" ;
65import pluginReactHooks from "eslint-plugin-react-hooks" ;
@@ -14,8 +13,6 @@ import TSCONFIG from "./tsconfig.json" with { type: "json" };
1413
1514const GLOB_TS = [ "**/*.ts" , "**/*.tsx" ] ;
1615const GLOB_JS = [ "**/*.js" , "**/*.jsx" ] ;
17- const GLOB_MD = [ "**/*.md" ] ;
18- const GLOB_MDX = [ "**/*.mdx" ] ;
1916const GLOB_APP = [ "app/**/*.{js,ts,jsx,tsx}" ] ;
2017const GLOB_COMPONENT = [ "components/**/*.{js,ts,jsx,tsx}" ] ;
2118const GLOB_CONFIG = [ "**/*.config.{js,mjs,ts,tsx}" ] ;
@@ -31,23 +28,6 @@ const gitignore = fileURLToPath(new URL(".gitignore", import.meta.url));
3128export default defineConfig ( [
3229 includeIgnoreFile ( gitignore , "Imported .gitignore patterns" ) ,
3330 globalIgnores ( GLOB_IGNORES ) ,
34- {
35- extends : [
36- markdown . configs . recommended ,
37- ] ,
38- files : [ ...GLOB_MD , ...GLOB_MDX ] ,
39- language : "markdown/gfm" ,
40- rules : {
41- "markdown/no-html" : "warn" ,
42- "markdown/no-missing-label-refs" : "off" ,
43- } ,
44- } ,
45- {
46- files : GLOB_MDX ,
47- rules : {
48- "markdown/no-html" : "off" ,
49- } ,
50- } ,
5131 {
5232 extends : [
5333 strictTypeChecked ,
@@ -65,6 +45,7 @@ export default defineConfig([
6545 extends : [
6646 tseslint . configs . recommendedTypeChecked ,
6747 react . configs [ "recommended-type-checked" ] ,
48+ pluginReactHooks . configs . flat [ "recommended-latest" ] ?? [ ] ,
6849 ] ,
6950 files : TSCONFIG . include ,
7051 languageOptions : {
@@ -76,11 +57,9 @@ export default defineConfig([
7657 } ,
7758 } ,
7859 plugins : {
79- "react-hooks" : pluginReactHooks ,
8060 "react-refresh" : pluginReactRefresh ,
8161 } ,
8262 rules : {
83- ...pluginReactHooks . configs . recommended . rules ,
8463 "@eslint-react/naming-convention/filename" : [ "error" , { rule : "kebab-case" } ] ,
8564 "@eslint-react/no-unused-props" : "warn" ,
8665 "react-refresh/only-export-components" : "warn" ,
0 commit comments