-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
51 lines (50 loc) · 1.03 KB
/
eslint.config.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
module.exports = tseslint.config(
{
ignores: ["**/__test__", "**/*.json"],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
parserOptions: {
project: true,
ecmaVersion: 2020,
},
},
},
{
files: ["*.ts", "*.js"],
...tseslint.configs.disableTypeChecked,
},
{
files: ["*.test *.js"],
rules: {
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-unsafe-call": 0,
languageOptions: {
globals: {
it: "readonly",
describe: "readonly",
},
},
},
},
{
rules: {
semi: "error",
"@typescript-eslint/no-unused-vars": 2,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-var-requires": 0,
"no-shadow": [2, { allow: ["req", "res", "err"] }],
"new-cap": 0,
"one-var-declaration-per-line": 0,
"consistent-return": 0,
"no-param-reassign": 0,
"comma-dangle": 0,
"no-undef": 0,
curly: ["error", "multi-line"],
},
},
);