File tree Expand file tree Collapse file tree 5 files changed +31
-1
lines changed Expand file tree Collapse file tree 5 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 99 javascript ,
1010 jsdoc ,
1111 jsonc ,
12+ jsx ,
1213 node ,
1314 perfectionist ,
1415 react ,
@@ -38,6 +39,7 @@ const configs = await combine(
3839 javascript ( ) ,
3940 jsdoc ( ) ,
4041 jsonc ( ) ,
42+ jsx ( ) ,
4143 node ( ) ,
4244 perfectionist ( ) ,
4345 react ( ) ,
Original file line number Diff line number Diff line change @@ -19,3 +19,4 @@ export * from './svelte'
1919export * from './tailwindcss'
2020export * from './command'
2121export * from './regexp'
22+ export * from './jsx'
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ export async function javascript(
3636 linterOptions : {
3737 reportUnusedDisableDirectives : true ,
3838 } ,
39+ name : 'coderwyd/javascript/setup' ,
40+ } ,
41+ {
3942 name : 'coderwyd/javascript/rules' ,
4043 plugins : {
4144 'unused-imports' : pluginUnusedImports ,
Original file line number Diff line number Diff line change 1+ import { GLOB_JSX , GLOB_TSX } from '../constants/glob'
2+ import type { TypedFlatConfigItem } from '../types'
3+
4+ export async function jsx ( ) : Promise < TypedFlatConfigItem [ ] > {
5+ return [
6+ {
7+ files : [ GLOB_JSX , GLOB_TSX ] ,
8+ languageOptions : {
9+ parserOptions : {
10+ ecmaFeatures : {
11+ jsx : true ,
12+ } ,
13+ } ,
14+ } ,
15+ name : 'coderwyd/jsx/setup' ,
16+ } ,
17+ ]
18+ }
Original file line number Diff line number Diff line change 88 javascript ,
99 jsdoc ,
1010 jsonc ,
11+ jsx ,
1112 node ,
1213 perfectionist ,
1314 react ,
@@ -89,6 +90,7 @@ export async function defineConfig(
8990 } ,
9091 gitignore : enableGitignore = true ,
9192 isInEditor = defaultIsInEditor ,
93+ jsx : enableJsx = true ,
9294 react : enableReact = false ,
9395 regexp : enableRegexp = true ,
9496 svelte : enableSvelte = false ,
@@ -106,7 +108,7 @@ export async function defineConfig(
106108 : { }
107109
108110 if ( stylisticOptions && ! ( 'jsx' in stylisticOptions ) )
109- stylisticOptions . jsx = options . jsx ?? true
111+ stylisticOptions . jsx = enableJsx
110112
111113 const configs : Awaitable < TypedFlatConfigItem [ ] > [ ] = [ ]
112114
@@ -157,6 +159,10 @@ export async function defineConfig(
157159 if ( enableVue )
158160 componentExts . push ( 'vue' )
159161
162+ if ( enableJsx ) {
163+ configs . push ( jsx ( ) )
164+ }
165+
160166 if ( enableTypeScript ) {
161167 configs . push (
162168 typescript ( {
You can’t perform that action at this time.
0 commit comments