Skip to content

Commit b6453c3

Browse files
committed
chore: lint
1 parent e9f213b commit b6453c3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/configs/react.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@ import type { FlatESLintConfigItem } from 'eslint-define-config'
22
import { GLOB_JSX, GLOB_TSX } from 'src/globs'
33
import { parserTs, pluginReact, pluginReactHooks } from '../plugins'
44
import type { OptionsHasTypeScript } from '../types'
5+
import { OFF } from './../flags'
56

67
export 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
},

0 commit comments

Comments
 (0)