1- import js from '@eslint/js'
2- import globals from 'globals'
3- import react from 'eslint-plugin-react'
4- import reactHooks from 'eslint-plugin-react-hooks'
5- import reactRefresh from 'eslint-plugin-react-refresh'
1+ // import js from '@eslint/js'
2+ // import globals from 'globals'
3+ // import react from 'eslint-plugin-react'
4+ // import reactHooks from 'eslint-plugin-react-hooks'
5+ // import reactRefresh from 'eslint-plugin-react-refresh'
6+
7+ // export default [
8+ // { ignores: ['dist'] },
9+ // {
10+ // files: ['**/*.{js,jsx,ts,tsx}'],
11+ // languageOptions: {
12+ // ecmaVersion: 2020,
13+ // globals: globals.browser,
14+ // parserOptions: {
15+ // ecmaVersion: 'latest',
16+ // ecmaFeatures: { jsx: true },
17+ // sourceType: 'module',
18+ // },
19+ // },
20+ // settings: { react: { version: '18.3' } },
21+ // plugins: {
22+ // react,
23+ // 'react-hooks': reactHooks,
24+ // 'react-refresh': reactRefresh,
25+ // },
26+ // rules: {
27+ // ...js.configs.recommended.rules,
28+ // ...react.configs.recommended.rules,
29+ // ...react.configs['jsx-runtime'].rules,
30+ // ...reactHooks.configs.recommended.rules,
31+ // 'react/jsx-no-target-blank': 'off',
32+ // 'react-refresh/only-export-components': [
33+ // 'warn',
34+ // { allowConstantExport: true },
35+ // ],
36+ // },
37+ // },
38+ // ]
39+
40+ import js from "@eslint/js" ;
41+ import globals from "globals" ;
42+ import react from "eslint-plugin-react" ;
43+ import reactHooks from "eslint-plugin-react-hooks" ;
44+ import reactRefresh from "eslint-plugin-react-refresh" ;
45+ import mdx from "eslint-mdx" ;
646
747export default [
8- { ignores : [ 'dist' ] } ,
48+ { ignores : [ "dist" ] } ,
49+
50+ // ✅ Base config for JS/TS/React
951 {
10- files : [ ' **/*.{js,jsx,ts,tsx}' ] ,
52+ files : [ " **/*.{js,jsx,ts,tsx}" ] ,
1153 languageOptions : {
1254 ecmaVersion : 2020 ,
1355 globals : globals . browser ,
1456 parserOptions : {
15- ecmaVersion : ' latest' ,
57+ ecmaVersion : " latest" ,
1658 ecmaFeatures : { jsx : true } ,
17- sourceType : ' module' ,
59+ sourceType : " module" ,
1860 } ,
1961 } ,
20- settings : { react : { version : '18.3' } } ,
62+ settings : {
63+ react : { version : "18.3" } ,
64+ } ,
2165 plugins : {
2266 react,
23- ' react-hooks' : reactHooks ,
24- ' react-refresh' : reactRefresh ,
67+ " react-hooks" : reactHooks ,
68+ " react-refresh" : reactRefresh ,
2569 } ,
2670 rules : {
2771 ...js . configs . recommended . rules ,
2872 ...react . configs . recommended . rules ,
29- ...react . configs [ ' jsx-runtime' ] . rules ,
73+ ...react . configs [ " jsx-runtime" ] . rules ,
3074 ...reactHooks . configs . recommended . rules ,
31- ' react/jsx-no-target-blank' : ' off' ,
32- ' react-refresh/only-export-components' : [
33- ' warn' ,
75+ " react/jsx-no-target-blank" : " off" ,
76+ " react-refresh/only-export-components" : [
77+ " warn" ,
3478 { allowConstantExport : true } ,
3579 ] ,
3680 } ,
3781 } ,
38- ]
82+
83+ // ✅ MDX support
84+ {
85+ files : [ "**/*.{md,mdx}" ] ,
86+ languageOptions : {
87+ parser : mdx . parser ,
88+ } ,
89+ plugins : {
90+ mdx,
91+ } ,
92+ processor : mdx . processor ,
93+ rules : {
94+ // Add MDX-specific rules if needed
95+ } ,
96+ } ,
97+ ] ;
0 commit comments