forked from gpbl/react-day-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
56 lines (54 loc) · 1.57 KB
/
.eslintrc.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* eslint-env node */
// @ts-check
/** @type {import("eslint").Linter.Config} */
const config = {
parser: "@typescript-eslint/parser",
ignorePatterns: ["**/*.css.d.ts", "dist", "build"],
plugins: ["react", "@typescript-eslint", "jest"],
extends: [
"plugin:jest/recommended",
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
react: {
version: "detect" // React version. "detect" automatically picks the version you have installed.
}
},
rules: {
"react/prop-types": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"import/no-unresolved": "off",
"prettier/prettier": "warn",
"no-console": "warn",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "warn"
},
overrides: [
{
files: ["**/?(*.)+(spec|test).[jt]s?(x)"],
env: {
jest: true
},
extends: ["plugin:jest/recommended", "plugin:testing-library/react"],
rules: {
"testing-library/no-render-in-setup": "off",
"testing-library/no-node-access": "off",
"testing-library/render-result-naming-convention": "off",
"testing-library/no-render-in-lifecycle": "off"
}
}
]
};
module.exports = config;