马宇豪
2024-07-16 f591c27b57e2418c9495bc02ae8cfff84d35bc18
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import { Linter } from "../index";
 
export interface NodeJSAndCommonJS extends Linter.RulesRecord {
    /**
     * Rule to require `return` statements after callbacks.
     *
     * @since 1.0.0-rc-1
     * @see https://eslint.org/docs/rules/callback-return
     */
    "callback-return": Linter.RuleEntry<[string[]]>;
 
    /**
     * Rule to require `require()` calls to be placed at top-level module scope.
     *
     * @since 1.4.0
     * @see https://eslint.org/docs/rules/global-require
     */
    "global-require": Linter.RuleEntry<[]>;
 
    /**
     * Rule to require error handling in callbacks.
     *
     * @since 0.4.5
     * @see https://eslint.org/docs/rules/handle-callback-err
     */
    "handle-callback-err": Linter.RuleEntry<[string]>;
 
    /**
     * Rule to disallow use of the `Buffer()` constructor.
     *
     * @since 4.0.0-alpha.0
     * @see https://eslint.org/docs/rules/no-buffer-constructor
     */
    "no-buffer-constructor": Linter.RuleEntry<[]>;
 
    /**
     * Rule to disallow `require` calls to be mixed with regular variable declarations.
     *
     * @since 0.0.9
     * @see https://eslint.org/docs/rules/no-mixed-requires
     */
    "no-mixed-requires": Linter.RuleEntry<
        [
            Partial<{
                /**
                 * @default false
                 */
                grouping: boolean;
                /**
                 * @default false
                 */
                allowCall: boolean;
            }>,
        ]
    >;
 
    /**
     * Rule to disallow `new` operators with calls to `require`.
     *
     * @since 0.6.0
     * @see https://eslint.org/docs/rules/no-new-require
     */
    "no-new-require": Linter.RuleEntry<[]>;
 
    /**
     * Rule to disallow string concatenation when using `__dirname` and `__filename`.
     *
     * @since 0.4.0
     * @see https://eslint.org/docs/rules/no-path-concat
     */
    "no-path-concat": Linter.RuleEntry<[]>;
 
    /**
     * Rule to disallow the use of `process.env`.
     *
     * @since 0.9.0
     * @see https://eslint.org/docs/rules/no-process-env
     */
    "no-process-env": Linter.RuleEntry<[]>;
 
    /**
     * Rule to disallow the use of `process.exit()`.
     *
     * @since 0.4.0
     * @see https://eslint.org/docs/rules/no-process-exit
     */
    "no-process-exit": Linter.RuleEntry<[]>;
 
    /**
     * Rule to disallow specified modules when loaded by `require`.
     *
     * @since 0.6.0
     * @see https://eslint.org/docs/rules/no-restricted-modules
     */
    "no-restricted-modules": Linter.RuleEntry<
        [
            ...Array<
                | string
                | {
                      name: string;
                      message?: string | undefined;
                  }
                | Partial<{
                      paths: Array<
                          | string
                          | {
                                name: string;
                                message?: string | undefined;
                            }
                      >;
                      patterns: string[];
                  }>
            >
        ]
    >;
 
    /**
     * Rule to disallow synchronous methods.
     *
     * @since 0.0.9
     * @see https://eslint.org/docs/rules/no-sync
     */
    "no-sync": Linter.RuleEntry<
        [
            {
                /**
                 * @default false
                 */
                allowAtRootLevel: boolean;
            },
        ]
    >;
}