This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc
86 lines (83 loc) · 2.19 KB
/
.eslintrc
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
75
76
77
78
79
80
81
82
83
84
85
86
{
"extends": ["@ivangabriele/eslint-config-typescript-next"],
"parserOptions": {
"ecmaVersion": 2022,
"extraFileExtensions": [".cjs"],
"project": "./tsconfig.dev.json"
},
"ignorePatterns": ["next-env.d.ts"],
"plugins": ["formatjs"],
"rules": {
"@typescript-eslint/no-use-before-define": "off",
"formatjs/enforce-default-message": "error",
"formatjs/enforce-description": "error",
"formatjs/enforce-id": "error",
"formatjs/enforce-placeholders": [
"error",
{
"ignoreList": ["a"]
}
],
"formatjs/enforce-plural-rules": [
"error",
// https://formatjs.io/docs/tooling/linter/#available-rules-1
{
"few": false,
"many": false,
"one": true,
"other": true,
"two": false,
"zero": false
}
],
"formatjs/no-camel-case": "error",
"formatjs/no-complex-selectors": ["error", { "limit": 2 }],
"formatjs/no-emoji": "error",
"formatjs/no-multiple-plurals": "error",
"formatjs/no-multiple-whitespaces": "error",
"formatjs/no-offset": "error",
"react/jsx-props-no-spreading": "off",
"react/no-unstable-nested-components": "off",
"react/require-default-props": "off"
},
"overrides": [
{
"files": ["./app/**/*.ts", "./app/**/*.tsx", "./common/**/*.ts", "./pages/**/*.tsx"],
"env": {
"browser": true,
"node": true
}
},
{
"files": ["./api/**/*.ts", "./pages/**/*.ts"],
"env": {
"browser": false,
"node": true
}
},
{
"files": [
"./config/**/*.js",
"./config/**/*.ts",
"./e2e/**/*.ts",
"./prisma/seeds/**/*.js",
"./scripts/**/*.js",
"./scripts/**/*.ts",
"**/*.test.ts"
],
"env": {
"browser": false,
"node": true
},
"rules": {
"no-await-in-loop": "off",
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-continue": "off",
"no-restricted-syntax": "off",
"import/extensions": ["off"],
"import/no-default-export": ["off"],
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
}
}
]
}