eslint 9.9.0 → 9.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,160 @@
1
+ /**
2
+ * @fileoverview This file contains the rule types for ESLint. It was initially extracted
3
+ * from the `@types/eslint` package.
4
+ */
5
+
6
+ /*
7
+ * MIT License
8
+ * Copyright (c) Microsoft Corporation.
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ * of this software and associated documentation files (the "Software"), to deal
12
+ * in the Software without restriction, including without limitation the rights
13
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ * copies of the Software, and to permit persons to whom the Software is
15
+ * furnished to do so, subject to the following conditions:
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE
26
+ */
27
+
28
+ import { Linter } from "../index";
29
+
30
+ export interface NodeJSAndCommonJS extends Linter.RulesRecord {
31
+ /**
32
+ * Rule to require `return` statements after callbacks.
33
+ *
34
+ * @since 1.0.0-rc-1
35
+ * @see https://eslint.org/docs/rules/callback-return
36
+ */
37
+ "callback-return": Linter.RuleEntry<[string[]]>;
38
+
39
+ /**
40
+ * Rule to require `require()` calls to be placed at top-level module scope.
41
+ *
42
+ * @since 1.4.0
43
+ * @see https://eslint.org/docs/rules/global-require
44
+ */
45
+ "global-require": Linter.RuleEntry<[]>;
46
+
47
+ /**
48
+ * Rule to require error handling in callbacks.
49
+ *
50
+ * @since 0.4.5
51
+ * @see https://eslint.org/docs/rules/handle-callback-err
52
+ */
53
+ "handle-callback-err": Linter.RuleEntry<[string]>;
54
+
55
+ /**
56
+ * Rule to disallow use of the `Buffer()` constructor.
57
+ *
58
+ * @since 4.0.0-alpha.0
59
+ * @see https://eslint.org/docs/rules/no-buffer-constructor
60
+ */
61
+ "no-buffer-constructor": Linter.RuleEntry<[]>;
62
+
63
+ /**
64
+ * Rule to disallow `require` calls to be mixed with regular variable declarations.
65
+ *
66
+ * @since 0.0.9
67
+ * @see https://eslint.org/docs/rules/no-mixed-requires
68
+ */
69
+ "no-mixed-requires": Linter.RuleEntry<
70
+ [
71
+ Partial<{
72
+ /**
73
+ * @default false
74
+ */
75
+ grouping: boolean;
76
+ /**
77
+ * @default false
78
+ */
79
+ allowCall: boolean;
80
+ }>,
81
+ ]
82
+ >;
83
+
84
+ /**
85
+ * Rule to disallow `new` operators with calls to `require`.
86
+ *
87
+ * @since 0.6.0
88
+ * @see https://eslint.org/docs/rules/no-new-require
89
+ */
90
+ "no-new-require": Linter.RuleEntry<[]>;
91
+
92
+ /**
93
+ * Rule to disallow string concatenation when using `__dirname` and `__filename`.
94
+ *
95
+ * @since 0.4.0
96
+ * @see https://eslint.org/docs/rules/no-path-concat
97
+ */
98
+ "no-path-concat": Linter.RuleEntry<[]>;
99
+
100
+ /**
101
+ * Rule to disallow the use of `process.env`.
102
+ *
103
+ * @since 0.9.0
104
+ * @see https://eslint.org/docs/rules/no-process-env
105
+ */
106
+ "no-process-env": Linter.RuleEntry<[]>;
107
+
108
+ /**
109
+ * Rule to disallow the use of `process.exit()`.
110
+ *
111
+ * @since 0.4.0
112
+ * @see https://eslint.org/docs/rules/no-process-exit
113
+ */
114
+ "no-process-exit": Linter.RuleEntry<[]>;
115
+
116
+ /**
117
+ * Rule to disallow specified modules when loaded by `require`.
118
+ *
119
+ * @since 0.6.0
120
+ * @see https://eslint.org/docs/rules/no-restricted-modules
121
+ */
122
+ "no-restricted-modules": Linter.RuleEntry<
123
+ [
124
+ ...Array<
125
+ | string
126
+ | {
127
+ name: string;
128
+ message?: string | undefined;
129
+ }
130
+ | Partial<{
131
+ paths: Array<
132
+ | string
133
+ | {
134
+ name: string;
135
+ message?: string | undefined;
136
+ }
137
+ >;
138
+ patterns: string[];
139
+ }>
140
+ >,
141
+ ]
142
+ >;
143
+
144
+ /**
145
+ * Rule to disallow synchronous methods.
146
+ *
147
+ * @since 0.0.9
148
+ * @see https://eslint.org/docs/rules/no-sync
149
+ */
150
+ "no-sync": Linter.RuleEntry<
151
+ [
152
+ {
153
+ /**
154
+ * @default false
155
+ */
156
+ allowAtRootLevel: boolean;
157
+ },
158
+ ]
159
+ >;
160
+ }