forked from SBoudrias/Inquirer.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
57 lines (57 loc) · 1.52 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
{
"extends": ["xo", "prettier"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "node", "unicorn", "prettier"],
"env": {
"node": true,
"es2022": true
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"default-param-last": "off",
"padding-line-between-statements": "off",
"no-eq-null": "off",
"node/no-extraneous-import": ["error", {
"allowModules": ["@jest/globals"]
}],
"eqeqeq": [
"error",
"always",
{
"null": "ignore"
}
],
"prettier/prettier": "error",
"unicorn/prefer-module": "error",
"unicorn/prefer-node-protocol": "error"
},
"overrides": [
{
"files": ["*.ts"],
"rules": {
// Disabled per typescript-eslint recommendation: https://github.com/typescript-eslint/typescript-eslint/blob/e26e43ffba96f6d46198b22f1c8dd5c814db2652/docs/getting-started/linting/FAQ.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
"no-undef": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error"
}
},
{
"files": ["*.js"],
"rules": {
"node/file-extension-in-import": "error",
"node/no-missing-import": "error",
"node/no-extraneous-import": "error"
}
},
{
"files": ["test.js", "*.test.js", "**/test/**"],
"env": {
"mocha": true,
"jest": true
}
}
]
}