-
Notifications
You must be signed in to change notification settings - Fork 53
/
.eslintrc.next.js
35 lines (35 loc) · 1.14 KB
/
.eslintrc.next.js
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
module.exports = {
extends: [".eslintrc.js"],
overrides: [
{
files: ["packages/*/src/**/*.ts"],
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json", "packages/*/tsconfig.json"],
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
rules: {
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"no-constant-condition": ["error", { checkLoops: false }],
"@typescript-eslint/no-magic-numbers": [
"error",
{
ignoreEnums: true,
ignoreArrayIndexes: true,
ignoreClassFieldInitialValues: true,
ignoreDefaultValues: true,
ignore: [
-1, // index -1 is not found
0, // first element of an array
1, // common for i + 1 in a loop
2, // slice(2) for string that starts with "0x" is common to work with 3rd-party libs
16, // toString(16)
1000, // second to millisecond
],
},
],
},
},
],
};