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'
2
2
import { GLOB_JSX , GLOB_TSX } from 'src/globs'
3
3
import { parserTs , pluginReact , pluginReactHooks } from '../plugins'
4
4
import type { OptionsHasTypeScript } from '../types'
5
+ import { OFF } from './../flags'
5
6
6
7
export function react ( options : OptionsHasTypeScript = { } ) : FlatESLintConfigItem [ ] {
7
8
return [
8
9
{
9
10
files : [ GLOB_JSX , GLOB_TSX ] ,
10
11
languageOptions : {
11
- parser : options . typescript ? parserTs as any : null ,
12
12
parserOptions : {
13
+ ecmaFeatures : {
14
+ jsx : true ,
15
+ } ,
16
+ parser : options . typescript ? parserTs as any : null ,
13
17
sourceType : 'module' ,
14
18
} ,
15
19
} ,
@@ -26,7 +30,7 @@ export function react(options: OptionsHasTypeScript = {}): FlatESLintConfigItem[
26
30
'jsx-quotes' : [ 'error' , 'prefer-double' ] ,
27
31
28
32
...pluginReact . configs . recommended . rules ,
29
- 'react/react-in-jsx-scope' : 'off' ,
33
+ 'react/react-in-jsx-scope' : OFF ,
30
34
31
35
...pluginReactHooks . configs . recommended . rules ,
32
36
} ,
You can’t perform that action at this time.
0 commit comments