Skip to content

Commit bccd576

Browse files
committed
chore(eslint): add flat ESLint config to enable JSX parsing
1 parent fe976ac commit bccd576

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

eslint.config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import babelParser from '@babel/eslint-parser';
2+
import reactPlugin from 'eslint-plugin-react';
3+
4+
export default [
5+
{
6+
ignores: ['**/public/**', '**/node_modules/**'],
7+
},
8+
{
9+
files: ['**/*.js', '**/*.jsx'],
10+
languageOptions: {
11+
parser: babelParser,
12+
parserOptions: {
13+
requireConfigFile: false,
14+
ecmaVersion: 2020,
15+
sourceType: 'module',
16+
ecmaFeatures: { jsx: true },
17+
},
18+
globals: { window: 'readonly', document: 'readonly' },
19+
},
20+
plugins: { react: reactPlugin },
21+
rules: {
22+
// basic recommended ruleset
23+
},
24+
},
25+
];
26+

0 commit comments

Comments
 (0)