-
Notifications
You must be signed in to change notification settings - Fork 21
/
.eslintrc.json
45 lines (41 loc) · 1.37 KB
/
.eslintrc.json
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
{
"root": true,
"extends": ["next/core-web-vitals", "prettier"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"no-console": ["warn", { "allow": ["error", "debug"] }],
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
],
// https://eslint.org/docs/latest/rules/camelcase
// This will raise an error whenever it encounters a variable or property that is not in camelCase.
"camelcase": ["error", { "properties": "always" }],
// https://eslint.org/docs/rules/new-cap
// The new-cap rule requires a constructor name to be capitalized.
// The capIsNew: false option allows capitalized functions to be used without the new keyword.
"new-cap": ["error", { "capIsNew": false }],
// throw an error for unused variables
"@typescript-eslint/no-unused-vars": ["error"],
// TODO: fix related https://github.com/DeXter-on-Radix/website/issues/75
"@next/next/no-img-element": "off"
},
"overrides": [
{
"files": ["src/app/components/*.tsx"],
"rules": {
"no-restricted-imports": [
"error",
{
// restrict data fetching in components
// all data related logic should be in redux
"paths": ["@radixdlt/radix-dapp-toolkit", "alphadex-sdk-js"]
}
]
}
}
]
}