Skip to content

Commit 81a5c93

Browse files
fix: update node rules
1 parent bcf76eb commit 81a5c93

File tree

6 files changed

+35
-6
lines changed

6 files changed

+35
-6
lines changed

src/builtin/best-practices.ts

-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ const useObjectDefineProperty = "Please use Object.defineProperty instead.";
66

77
export const rules: Linter.Config["rules"] = {
88
"accessor-pairs": "error",
9-
"array-callback-return": [
10-
"error",
11-
{
12-
allowImplicit: false,
13-
},
14-
],
159
"block-scoped-var": "error",
1610
"class-methods-use-this": "error",
1711
"complexity": "off",

src/builtin/deprecated.ts

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type { Linter } from "eslint";
2+
3+
export const rules: Linter.Config["rules"] = {
4+
"callback-return": "off",
5+
"global-require": "off",
6+
"handle-callback-err": "off",
7+
"id-blacklist": "off",
8+
"indent-legacy": "off",
9+
"lines-around-directive": "off",
10+
"newline-after-var": "off",
11+
"newline-before-return": "off",
12+
"no-buffer-constructor": "off",
13+
"no-catch-shadow": "off",
14+
"no-mixed-requires": "off",
15+
"no-native-reassign": "off",
16+
"no-negated-in-lhs": "off",
17+
"no-new-require": "off",
18+
"no-path-concat": "off",
19+
"no-process-env": "off",
20+
"no-process-exit": "off",
21+
"no-restricted-modules": "off",
22+
"no-spaced-func": "off",
23+
"no-sync": "off",
24+
"prefer-reflect": "off",
25+
"require-jsdoc": "off",
26+
"valid-jsdoc": "off",
27+
};

src/builtin/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Linter } from "eslint";
22

33
import { rules as bestPractices } from "./best-practices";
4+
import { rules as deprecated } from "./deprecated";
45
import { rules as es6 } from "./es6";
56
import { rules as possibleErrors } from "./possible-errors";
67
import { rules as strict } from "./strict";
@@ -14,4 +15,5 @@ export const rules: Linter.Config["rules"] = {
1415
...strict,
1516
...stylisticIssues,
1617
...variables,
18+
...deprecated,
1719
};

src/configs/script.ts

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const baseConfig: Linter.Config = {
66
"functional/no-expression-statement": "off",
77
"functional/no-loop-statement": "off",
88
"functional/no-throw-statement": "off",
9+
"node/no-process-exit": "off",
10+
"node/no-sync": "off",
11+
"node/no-unpublished-import": "off",
912
},
1013
};
1114

src/plugins/node.ts

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const settings: Linter.Config = {
2525
"node/no-process-exit": "error",
2626
"node/no-sync": "error",
2727
"node/no-unpublished-import": "warn",
28+
"node/no-unsupported-features/es-syntax": "off",
2829
"node/prefer-global/buffer": ["error", "always"],
2930
"node/prefer-global/console": ["error", "always"],
3031
"node/prefer-global/process": ["error", "always"],

src/plugins/unicorn.ts

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export const settings: Linter.Config = {
1313
"unicorn/no-array-reduce": "off",
1414
"unicorn/no-nested-ternary": "off",
1515
"unicorn/no-null": "off",
16+
// "node/no-process-exit" covers this.
17+
"unicorn/no-process-exit": "off",
1618
"unicorn/no-useless-undefined": "off",
1719
"unicorn/prefer-at": [
1820
"error",

0 commit comments

Comments
 (0)