-
-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy patheslint.config.js
More file actions
32 lines (32 loc) · 936 Bytes
/
eslint.config.js
File metadata and controls
32 lines (32 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// eslint.config.js for ESLint v9+ (flat config, React/JSX support)
// NOTE: To avoid the MODULE_TYPELESS_PACKAGE_JSON warning, add "type": "module" to package.json
export default [
{
ignores: ["node_modules/**", "dist/**", "build/**", "**/*.min.js"],
languageOptions: {
ecmaVersion: 2020,
sourceType: "module",
parser: (await import("@babel/eslint-parser")).default,
parserOptions: {
ecmaFeatures: {
jsx: true
},
requireConfigFile: false
}
},
plugins: {
react: (await import("eslint-plugin-react")).default,
},
rules: {
"react/jsx-uses-react": "off", // Not needed in React 17+
"react/react-in-jsx-scope": "off", // Not needed in React 17+
"react/prop-types": "off" // Disable if not using PropTypes
},
files: ["**/*.js", "**/*.jsx"],
settings: {
react: {
version: "detect"
}
}
}
];