-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
62 lines (62 loc) · 2.4 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"next/core-web-vitals"
],
"plugins": ["@typescript-eslint"],
"rules": {
"no-restricted-imports": [
"warn", {
"name": "axios",
"message": "If using on the frontend, consider fetching using src/requests.ts instead. If you are sure this import is necessary, please mark line with eslint-disable-line."
}
],
"no-restricted-syntax": [
"error", {
"message": "Do not use the setInterval() function directly. Instead, use the addInterval() function available in src/cleanup.ts.",
"selector": "CallExpression[callee.name='setInterval']"
}, {
"message": "Consider using the addLongTimeout() function available in src/cleanup.ts instead if the timeout is long and infrequent. If you've confirmed this is not the case, please mark line with eslint-disable-line.",
"selector": "CallExpression[callee.name='setTimeout']"
}, {
"message": "It is not recommended to use localStorage directory. Instead, use the standardized functions available in src/storage.ts.",
"selector": "MemberExpression[object.name='localStorage']"
}
],
"require-await": 2,
"@typescript-eslint/no-unused-vars": [
"warn",
{ "varsIgnorePattern": "_" }
],
"@typescript-eslint/no-misused-promises": [
"error",
{ "checksVoidReturn": false }
],
"@typescript-eslint/ban-types": [
"warn", {
"types": { "Function": false },
"extendDefaults": true
}
],
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/await-thenable": 1,
"@typescript-eslint/no-unnecessary-condition": [
"error", {
"allowConstantLoopConditions": true
}
],
"no-return-await": "warn",
"no-constant-condition": [
"error", {
"checkLoops": false
}
],
"prefer-const": "warn"
},
"parserOptions": {
"project": ["./tsconfig.json"] // Specify it only for TypeScript files
}
}