forked from yext/studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
74 lines (74 loc) · 1.79 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
module.exports = {
root: true,
extends: ["@yext/eslint-config/typescript-react"],
ignorePatterns: [
"**/lib",
"**/build",
"e2e-tests/tests/__fixtures__/**/*.tsx",
"packages/studio-plugin/tests/__fixtures__/**/*.tsx",
"packages/studio-plugin/tests/__fixtures__/StudioConfigs/malformed/studio.config.js",
".eslintrc.cjs",
"**/coverage",
"*.d.ts",
],
parserOptions: {
project: ["tsconfig.json"],
},
plugins: ["unused-imports"],
rules: {
"@typescript-eslint/require-await": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: false,
},
],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/await-thenable": "error",
"unused-imports/no-unused-imports": "error",
},
overrides: [
{
files: [
"**/*.{test,stories}.*",
"./e2e-tests/**/*",
"./apps/test-site/**/*",
],
rules: {
"react-perf/jsx-no-new-array-as-prop": "off",
"react-perf/jsx-no-new-function-as-prop": "off",
"react-perf/jsx-no-new-object-as-prop": "off",
"no-template-curly-in-string": "off",
},
},
{
files: [
"**/__fixtures__/**/*.{j,t}s",
"**/src/siteSettings.ts",
"**/studio.config.js",
],
rules: {
"import/no-anonymous-default-export": "off",
"no-template-curly-in-string": "off",
},
},
{
files: ["./e2e-tests/**/*"],
rules: {
"testing-library/prefer-screen-queries": "off",
},
},
{
files: ["**/*.js"],
rules: {
"tsdoc/syntax": "off",
},
},
{
files: ["packages/studio-plugin/**/*.ts"],
rules: {
"no-restricted-imports": ["warn", "path"],
},
},
],
};