-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.cjs
33 lines (33 loc) · 1016 Bytes
/
eslint.config.cjs
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
33
/** @type {import('eslint').Linter.FlatConfig} */
module.exports = [
{
files: ["*.ts", "*.tsx", "*.js", "*.jsx"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
parser: require("@typescript-eslint/parser"), // Correctly import the TypeScript parser
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
react: require("eslint-plugin-react"),
"@typescript-eslint": require("@typescript-eslint/eslint-plugin"),
import: require("eslint-plugin-import"),
},
settings: {
react: {
version: "detect",
},
},
rules: {
"@typescript-eslint/no-unused-vars": "warn",
"testing-library/no-node-access": "off",
"react/react-in-jsx-scope": "off", // React 17+ no longer requires React in scope
"react/prop-types": "off", // Disable prop-types in TypeScript projects
"import/no-unresolved": "off", // Disable unresolved imports errors
},
},
];