File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,18 @@ import type { FlatESLintConfigItem } from 'eslint-define-config'
22import { GLOB_JSX , GLOB_TSX } from 'src/globs'
33import { parserTs , pluginReact , pluginReactHooks } from '../plugins'
44import type { OptionsHasTypeScript } from '../types'
5+ import { OFF } from './../flags'
56
67export function react ( options : OptionsHasTypeScript = { } ) : FlatESLintConfigItem [ ] {
78 return [
89 {
910 files : [ GLOB_JSX , GLOB_TSX ] ,
1011 languageOptions : {
11- parser : options . typescript ? parserTs as any : null ,
1212 parserOptions : {
13+ ecmaFeatures : {
14+ jsx : true ,
15+ } ,
16+ parser : options . typescript ? parserTs as any : null ,
1317 sourceType : 'module' ,
1418 } ,
1519 } ,
@@ -26,7 +30,7 @@ export function react(options: OptionsHasTypeScript = {}): FlatESLintConfigItem[
2630 'jsx-quotes' : [ 'error' , 'prefer-double' ] ,
2731
2832 ...pluginReact . configs . recommended . rules ,
29- 'react/react-in-jsx-scope' : 'off' ,
33+ 'react/react-in-jsx-scope' : OFF ,
3034
3135 ...pluginReactHooks . configs . recommended . rules ,
3236 } ,
You can’t perform that action at this time.
0 commit comments