1- import js from "@eslint/js" ;
2- import * as mdx from "eslint-plugin-mdx" ;
1+ // ts-check
2+
3+ import eslintJs from "@eslint/js" ;
4+ import eslintReact from "@eslint-react/eslint-plugin" ;
5+ import eslintPluginMdx from "eslint-plugin-mdx" ;
6+ import eslintPluginNext from "@next/eslint-plugin-next" ;
7+ import eslintPluginReactHooks from "eslint-plugin-react-hooks" ;
8+ import eslintPluginSimpleImportSort from "eslint-plugin-simple-import-sort" ;
39import tseslint from "typescript-eslint" ;
4- import next from "@next/eslint-plugin-next" ;
5- import react from "@eslint-react/eslint-plugin" ;
6- import reactHooks from "eslint-plugin-react-hooks" ;
710import gitignore from "eslint-config-flat-gitignore" ;
8- import simpleImportSort from "eslint-plugin-simple-import-sort" ;
911
1012const GLOB_TS = [ "**/*.{ts,tsx}" ] ;
1113const GLOB_JS = [ "**/*.{js,cjs,mjs}" ] ;
@@ -14,11 +16,11 @@ const GLOB_APP = ["app/**/*.{js,ts,jsx,tsx}"];
1416const GLOB_CONFIG = [ "**/*.config.{js,mjs,cjs,ts,tsx}" ] ;
1517
1618export default tseslint . config (
17- js . configs . recommended ,
19+ eslintJs . configs . recommended ,
1820 {
19- ...mdx . flat ,
21+ ...eslintPluginMdx . flat ,
2022 files : GLOB_MDX ,
21- processor : mdx . createRemarkProcessor ( {
23+ processor : eslintPluginMdx . createRemarkProcessor ( {
2224 lintCodeBlocks : false ,
2325 } ) ,
2426 } ,
@@ -37,29 +39,29 @@ export default tseslint.config(
3739 } ,
3840 {
3941 files : [ ...GLOB_TS , ...GLOB_MDX ] ,
40- ...react . configs . recommended ,
42+ ...eslintReact . configs . recommended ,
4143 } ,
4244 {
4345 files : GLOB_TS ,
4446 plugins : {
45- "react-hooks" : reactHooks ,
47+ "react-hooks" : eslintPluginReactHooks ,
4648 } ,
47- rules : reactHooks . configs . recommended . rules ,
49+ rules : eslintPluginReactHooks . configs . recommended . rules ,
4850 } ,
4951 {
5052 files : GLOB_TS ,
5153 plugins : {
52- "@next/next" : next ,
54+ "@next/next" : eslintPluginNext ,
5355 } ,
5456 rules : {
55- ...next . configs . recommended . rules ,
56- ...next . configs [ "core-web-vitals" ] . rules ,
57+ ...eslintPluginNext . configs . recommended . rules ,
58+ ...eslintPluginNext . configs [ "core-web-vitals" ] . rules ,
5759 } ,
5860 } ,
5961 {
6062 files : [ ...GLOB_TS , ...GLOB_MDX ] ,
6163 plugins : {
62- "simple-import-sort" : simpleImportSort ,
64+ "simple-import-sort" : eslintPluginSimpleImportSort ,
6365 } ,
6466 rules : {
6567 "simple-import-sort/exports" : "warn" ,
0 commit comments