@pobammer-ts/eslint-cease-nonsense-rules 0.11.0 → 1.0.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.
- package/dist/rules/ban-react-fc.js +4 -7
- package/dist/rules/ban-react-fc.js.map +1 -1
- package/dist/rules/enforce-ianitor-check-type.d.ts +7 -0
- package/dist/rules/enforce-ianitor-check-type.js +2 -2
- package/dist/rules/enforce-ianitor-check-type.js.map +1 -1
- package/dist/rules/no-color3-constructor.js +2 -1
- package/dist/rules/no-color3-constructor.js.map +1 -1
- package/dist/rules/no-shorthand-names.js +18 -18
- package/dist/rules/no-shorthand-names.js.map +1 -1
- package/dist/rules/prefer-sequence-overloads.js +17 -7
- package/dist/rules/prefer-sequence-overloads.js.map +1 -1
- package/dist/rules/prefer-udim2-shorthand.js +143 -20
- package/dist/rules/prefer-udim2-shorthand.js.map +1 -1
- package/dist/rules/require-named-effect-functions.js +103 -29
- package/dist/rules/require-named-effect-functions.js.map +1 -1
- package/dist/rules/require-react-component-keys.js +18 -17
- package/dist/rules/require-react-component-keys.js.map +1 -1
- package/dist/rules/use-exhaustive-dependencies.d.ts +0 -17
- package/dist/rules/use-exhaustive-dependencies.js +26 -108
- package/dist/rules/use-exhaustive-dependencies.js.map +1 -1
- package/dist/rules/use-hook-at-top-level.js +17 -118
- package/dist/rules/use-hook-at-top-level.js.map +1 -1
- package/package.json +6 -5
|
@@ -1,78 +1,46 @@
|
|
|
1
1
|
import { TSESTree } from "@typescript-eslint/types";
|
|
2
|
-
/**
|
|
3
|
-
* Pre-compiled regex for hook name detection (performance optimization).
|
|
4
|
-
*/
|
|
5
2
|
const HOOK_NAME_PATTERN = /^use[A-Z]/;
|
|
6
|
-
/**
|
|
7
|
-
* Pre-compiled regex for component name detection (performance optimization).
|
|
8
|
-
*/
|
|
9
3
|
const COMPONENT_NAME_PATTERN = /^[A-Z]/;
|
|
10
|
-
/**
|
|
11
|
-
* Checks if a function name matches the React hook naming convention.
|
|
12
|
-
*
|
|
13
|
-
* @param name - The function name to check.
|
|
14
|
-
* @returns True if the name starts with "use" followed by an uppercase letter.
|
|
15
|
-
*/
|
|
16
4
|
function isReactHook(name) {
|
|
17
5
|
return HOOK_NAME_PATTERN.test(name);
|
|
18
6
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Checks if a function name matches the React component naming convention.
|
|
21
|
-
*
|
|
22
|
-
* @param name - The function name to check.
|
|
23
|
-
* @returns True if the name starts with an uppercase letter.
|
|
24
|
-
*/
|
|
25
7
|
function isComponent(name) {
|
|
26
8
|
return COMPONENT_NAME_PATTERN.test(name);
|
|
27
9
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Determines if a function is a React component or custom hook.
|
|
30
|
-
*
|
|
31
|
-
* @param node - The function node to check.
|
|
32
|
-
* @returns True if the function is a component or hook.
|
|
33
|
-
*/
|
|
34
10
|
function isComponentOrHook(node) {
|
|
35
|
-
|
|
36
|
-
if (node.type === "FunctionDeclaration" && node.id) {
|
|
11
|
+
if (node.type === TSESTree.AST_NODE_TYPES.FunctionDeclaration && node.id) {
|
|
37
12
|
const { name } = node.id;
|
|
38
13
|
return isComponent(name) || isReactHook(name);
|
|
39
14
|
}
|
|
40
|
-
|
|
41
|
-
|
|
15
|
+
if (node.type === TSESTree.AST_NODE_TYPES.FunctionExpression ||
|
|
16
|
+
node.type === TSESTree.AST_NODE_TYPES.ArrowFunctionExpression) {
|
|
42
17
|
const { parent } = node;
|
|
43
18
|
if (!parent)
|
|
44
19
|
return false;
|
|
45
|
-
|
|
46
|
-
|
|
20
|
+
if (parent.type === TSESTree.AST_NODE_TYPES.VariableDeclarator &&
|
|
21
|
+
parent.id.type === TSESTree.AST_NODE_TYPES.Identifier) {
|
|
47
22
|
const { name } = parent.id;
|
|
48
23
|
return isComponent(name) || isReactHook(name);
|
|
49
24
|
}
|
|
50
|
-
|
|
51
|
-
|
|
25
|
+
if (parent.type === TSESTree.AST_NODE_TYPES.Property &&
|
|
26
|
+
parent.key.type === TSESTree.AST_NODE_TYPES.Identifier) {
|
|
52
27
|
const { name } = parent.key;
|
|
53
28
|
return isComponent(name) || isReactHook(name);
|
|
54
29
|
}
|
|
55
|
-
|
|
56
|
-
|
|
30
|
+
if (parent.type === TSESTree.AST_NODE_TYPES.MethodDefinition &&
|
|
31
|
+
parent.key.type === TSESTree.AST_NODE_TYPES.Identifier) {
|
|
57
32
|
const { name } = parent.key;
|
|
58
33
|
return isComponent(name) || isReactHook(name);
|
|
59
34
|
}
|
|
60
35
|
}
|
|
61
36
|
return false;
|
|
62
37
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Checks if a call expression is a hook call.
|
|
65
|
-
*
|
|
66
|
-
* @param node - The call expression node.
|
|
67
|
-
* @returns True if the call is a hook.
|
|
68
|
-
*/
|
|
69
38
|
function isHookCall(node) {
|
|
70
39
|
const { callee } = node;
|
|
71
|
-
|
|
72
|
-
if (callee.type === "Identifier")
|
|
40
|
+
if (callee.type === TSESTree.AST_NODE_TYPES.Identifier)
|
|
73
41
|
return isReactHook(callee.name);
|
|
74
|
-
|
|
75
|
-
|
|
42
|
+
if (callee.type === TSESTree.AST_NODE_TYPES.MemberExpression &&
|
|
43
|
+
callee.property.type === TSESTree.AST_NODE_TYPES.Identifier)
|
|
76
44
|
return isReactHook(callee.property.name);
|
|
77
45
|
return false;
|
|
78
46
|
}
|
|
@@ -81,22 +49,13 @@ const FUNCTION_BOUNDARIES = new Set([
|
|
|
81
49
|
TSESTree.AST_NODE_TYPES.FunctionExpression,
|
|
82
50
|
TSESTree.AST_NODE_TYPES.ArrowFunctionExpression,
|
|
83
51
|
]);
|
|
84
|
-
/**
|
|
85
|
-
* Checks if a node is inside a finally block.
|
|
86
|
-
*
|
|
87
|
-
* @param node - The node to check.
|
|
88
|
-
* @returns True if the node is in a finally block.
|
|
89
|
-
*/
|
|
90
52
|
function isInFinallyBlock(node) {
|
|
91
53
|
let current = node.parent;
|
|
92
54
|
const maxDepth = 20;
|
|
93
|
-
for (let depth = 0; depth < maxDepth && current; depth
|
|
94
|
-
// Stop at function boundaries
|
|
55
|
+
for (let depth = 0; depth < maxDepth && current; depth += 1) {
|
|
95
56
|
if (FUNCTION_BOUNDARIES.has(current.type))
|
|
96
57
|
return false;
|
|
97
|
-
|
|
98
|
-
if (current.type === "TryStatement") {
|
|
99
|
-
// Walk back down to see which block we're in
|
|
58
|
+
if (current.type === TSESTree.AST_NODE_TYPES.TryStatement) {
|
|
100
59
|
let checkNode = node;
|
|
101
60
|
while (checkNode && checkNode !== current) {
|
|
102
61
|
if (checkNode === current.finalizer)
|
|
@@ -109,13 +68,6 @@ function isInFinallyBlock(node) {
|
|
|
109
68
|
}
|
|
110
69
|
return false;
|
|
111
70
|
}
|
|
112
|
-
/**
|
|
113
|
-
* Checks if a call expression is recursive (calls itself).
|
|
114
|
-
*
|
|
115
|
-
* @param node - The call expression node.
|
|
116
|
-
* @param functionName - The name of the containing function.
|
|
117
|
-
* @returns True if the call is recursive.
|
|
118
|
-
*/
|
|
119
71
|
function isRecursiveCall(node, functionName) {
|
|
120
72
|
if (!functionName)
|
|
121
73
|
return false;
|
|
@@ -126,60 +78,29 @@ function isRecursiveCall(node, functionName) {
|
|
|
126
78
|
}
|
|
127
79
|
const useHookAtTopLevel = {
|
|
128
80
|
create(context) {
|
|
129
|
-
// Context stack for tracking control flow
|
|
130
81
|
const contextStack = new Array();
|
|
131
82
|
let currentFunctionName;
|
|
132
|
-
/**
|
|
133
|
-
* Gets the current control flow context.
|
|
134
|
-
*
|
|
135
|
-
* @returns The current context or undefined if not in a component/hook.
|
|
136
|
-
*/
|
|
137
83
|
function getCurrentContext() {
|
|
138
84
|
return contextStack.length > 0 ? contextStack.at(-1) : undefined;
|
|
139
85
|
}
|
|
140
|
-
/**
|
|
141
|
-
* Pushes a new context onto the stack.
|
|
142
|
-
*
|
|
143
|
-
* @param newContext - The context to push.
|
|
144
|
-
*/
|
|
145
86
|
function pushContext(newContext) {
|
|
146
87
|
contextStack.push(newContext);
|
|
147
88
|
}
|
|
148
|
-
/**
|
|
149
|
-
* Pops the top context from the stack.
|
|
150
|
-
*/
|
|
151
89
|
function popContext() {
|
|
152
90
|
contextStack.pop();
|
|
153
91
|
}
|
|
154
|
-
/**
|
|
155
|
-
* Updates the current context with new flags.
|
|
156
|
-
*
|
|
157
|
-
* @param updates - Partial context updates.
|
|
158
|
-
*/
|
|
159
92
|
function updateContext(updates) {
|
|
160
93
|
const current = getCurrentContext();
|
|
161
|
-
if (
|
|
162
|
-
|
|
163
|
-
contextStack[contextStack.length - 1] = {
|
|
164
|
-
...current,
|
|
165
|
-
...updates,
|
|
166
|
-
};
|
|
94
|
+
if (current)
|
|
95
|
+
contextStack[contextStack.length - 1] = { ...current, ...updates };
|
|
167
96
|
}
|
|
168
|
-
/**
|
|
169
|
-
* Handles function entry (component or hook).
|
|
170
|
-
*
|
|
171
|
-
* @param node - The function node.
|
|
172
|
-
*/
|
|
173
97
|
function handleFunctionEnter(node) {
|
|
174
98
|
const funcNode = node;
|
|
175
99
|
const current = getCurrentContext();
|
|
176
100
|
const depth = current ? current.functionDepth + 1 : 0;
|
|
177
|
-
// Check if this is a component or hook
|
|
178
101
|
const isComp = isComponentOrHook(funcNode);
|
|
179
|
-
|
|
180
|
-
if (funcNode.type === "FunctionDeclaration" && funcNode.id)
|
|
102
|
+
if (funcNode.type === TSESTree.AST_NODE_TYPES.FunctionDeclaration && funcNode.id)
|
|
181
103
|
currentFunctionName = funcNode.id.name;
|
|
182
|
-
// If we're already inside a component/hook, this is a nested function
|
|
183
104
|
if (current?.isComponentOrHook) {
|
|
184
105
|
pushContext({
|
|
185
106
|
afterEarlyReturn: false,
|
|
@@ -192,7 +113,6 @@ const useHookAtTopLevel = {
|
|
|
192
113
|
});
|
|
193
114
|
}
|
|
194
115
|
else if (isComp) {
|
|
195
|
-
// This is a top-level component or hook
|
|
196
116
|
pushContext({
|
|
197
117
|
afterEarlyReturn: false,
|
|
198
118
|
functionDepth: depth,
|
|
@@ -204,9 +124,6 @@ const useHookAtTopLevel = {
|
|
|
204
124
|
});
|
|
205
125
|
}
|
|
206
126
|
}
|
|
207
|
-
/**
|
|
208
|
-
* Handles function exit.
|
|
209
|
-
*/
|
|
210
127
|
function handleFunctionExit() {
|
|
211
128
|
const current = getCurrentContext();
|
|
212
129
|
if (current)
|
|
@@ -216,23 +133,17 @@ const useHookAtTopLevel = {
|
|
|
216
133
|
return {
|
|
217
134
|
ArrowFunctionExpression: handleFunctionEnter,
|
|
218
135
|
"ArrowFunctionExpression:exit": handleFunctionExit,
|
|
219
|
-
// Hook calls
|
|
220
136
|
CallExpression(node) {
|
|
221
137
|
const callNode = node;
|
|
222
|
-
// Early exit: not a hook call
|
|
223
138
|
if (!isHookCall(callNode))
|
|
224
139
|
return;
|
|
225
140
|
const current = getCurrentContext();
|
|
226
|
-
// Early exit: not in any tracked context
|
|
227
141
|
if (!current)
|
|
228
142
|
return;
|
|
229
|
-
// Early exit: not in a component/hook and not in a nested function
|
|
230
143
|
if (!current.isComponentOrHook && !current.inNestedFunction)
|
|
231
144
|
return;
|
|
232
|
-
// Allow hooks in finally blocks (they always execute)
|
|
233
145
|
if (isInFinallyBlock(callNode))
|
|
234
146
|
return;
|
|
235
|
-
// Check for recursion
|
|
236
147
|
if (isRecursiveCall(callNode, currentFunctionName)) {
|
|
237
148
|
context.report({
|
|
238
149
|
messageId: "recursiveHookCall",
|
|
@@ -240,7 +151,6 @@ const useHookAtTopLevel = {
|
|
|
240
151
|
});
|
|
241
152
|
return;
|
|
242
153
|
}
|
|
243
|
-
// Check for nested function
|
|
244
154
|
if (current.inNestedFunction) {
|
|
245
155
|
context.report({
|
|
246
156
|
messageId: "nestedFunction",
|
|
@@ -248,7 +158,6 @@ const useHookAtTopLevel = {
|
|
|
248
158
|
});
|
|
249
159
|
return;
|
|
250
160
|
}
|
|
251
|
-
// Check for conditional execution
|
|
252
161
|
if (current.inConditional) {
|
|
253
162
|
context.report({
|
|
254
163
|
messageId: "conditionalHook",
|
|
@@ -256,7 +165,6 @@ const useHookAtTopLevel = {
|
|
|
256
165
|
});
|
|
257
166
|
return;
|
|
258
167
|
}
|
|
259
|
-
// Check for loops
|
|
260
168
|
if (current.inLoop) {
|
|
261
169
|
context.report({
|
|
262
170
|
messageId: "loopHook",
|
|
@@ -264,7 +172,6 @@ const useHookAtTopLevel = {
|
|
|
264
172
|
});
|
|
265
173
|
return;
|
|
266
174
|
}
|
|
267
|
-
// Check for try blocks
|
|
268
175
|
if (current.inTryBlock) {
|
|
269
176
|
context.report({
|
|
270
177
|
messageId: "tryBlockHook",
|
|
@@ -272,7 +179,6 @@ const useHookAtTopLevel = {
|
|
|
272
179
|
});
|
|
273
180
|
return;
|
|
274
181
|
}
|
|
275
|
-
// Check for early return (this should be caught by conditional, but double-check)
|
|
276
182
|
if (current.afterEarlyReturn) {
|
|
277
183
|
context.report({
|
|
278
184
|
messageId: "afterEarlyReturn",
|
|
@@ -304,20 +210,16 @@ const useHookAtTopLevel = {
|
|
|
304
210
|
"ForOfStatement:exit"() {
|
|
305
211
|
updateContext({ inLoop: false });
|
|
306
212
|
},
|
|
307
|
-
// Loops
|
|
308
213
|
ForStatement() {
|
|
309
214
|
updateContext({ inLoop: true });
|
|
310
215
|
},
|
|
311
216
|
"ForStatement:exit"() {
|
|
312
217
|
updateContext({ inLoop: false });
|
|
313
218
|
},
|
|
314
|
-
// Function entry
|
|
315
219
|
FunctionDeclaration: handleFunctionEnter,
|
|
316
|
-
// Function exit
|
|
317
220
|
"FunctionDeclaration:exit": handleFunctionExit,
|
|
318
221
|
FunctionExpression: handleFunctionEnter,
|
|
319
222
|
"FunctionExpression:exit": handleFunctionExit,
|
|
320
|
-
// Conditional statements
|
|
321
223
|
IfStatement() {
|
|
322
224
|
updateContext({ inConditional: true });
|
|
323
225
|
},
|
|
@@ -330,7 +232,6 @@ const useHookAtTopLevel = {
|
|
|
330
232
|
"LogicalExpression:exit"() {
|
|
331
233
|
updateContext({ inConditional: false });
|
|
332
234
|
},
|
|
333
|
-
// Early returns - set flag on exit so hooks IN the return expression aren't flagged
|
|
334
235
|
"ReturnStatement:exit"() {
|
|
335
236
|
updateContext({ afterEarlyReturn: true });
|
|
336
237
|
},
|
|
@@ -340,9 +241,7 @@ const useHookAtTopLevel = {
|
|
|
340
241
|
"SwitchStatement:exit"() {
|
|
341
242
|
updateContext({ inConditional: false });
|
|
342
243
|
},
|
|
343
|
-
// Try blocks
|
|
344
244
|
TryStatement() {
|
|
345
|
-
// Mark entering try block (but not finally)
|
|
346
245
|
updateContext({ inTryBlock: true });
|
|
347
246
|
},
|
|
348
247
|
"TryStatement:exit"() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-hook-at-top-level.js","sourceRoot":"","sources":["../../src/rules/use-hook-at-top-level.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"use-hook-at-top-level.js","sourceRoot":"","sources":["../../src/rules/use-hook-at-top-level.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAsBpD,MAAM,iBAAiB,GAAG,WAAW,CAAC;AACtC,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AACxC,SAAS,WAAW,CAAC,IAAY;IAChC,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAChC,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,iBAAiB,CACzB,IAAmG;IAEnG,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,cAAc,CAAC,mBAAmB,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;QAC1E,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACzB,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,W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AS;KACf;CACD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "HowManySmall",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"typebox": "^1.0.
|
|
4
|
+
"typebox": "^1.0.50"
|
|
5
5
|
},
|
|
6
6
|
"description": "A bunch of lints to prevent idiot mistakes I encounter with frequency.",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@biomejs/biome": "^2.3.
|
|
8
|
+
"@biomejs/biome": "^2.3.4",
|
|
9
9
|
"@mitata/counters": "^0.0.8",
|
|
10
10
|
"@types/bun": "latest",
|
|
11
11
|
"@types/node": "^20.14.11",
|
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
"knip": "^5.66.0",
|
|
19
19
|
"mitata": "^1.0.34",
|
|
20
20
|
"oxfmt": "^0.9.0",
|
|
21
|
-
"oxlint": "^1.
|
|
22
|
-
"oxlint-tsgolint": "^0.
|
|
21
|
+
"oxlint": "^1.26.0",
|
|
22
|
+
"oxlint-tsgolint": "^0.5.0",
|
|
23
|
+
"sury": "^11.0.0-alpha.4",
|
|
23
24
|
"typescript": "^5.6.3"
|
|
24
25
|
},
|
|
25
26
|
"engines": {
|
|
@@ -67,5 +68,5 @@
|
|
|
67
68
|
"sideEffects": false,
|
|
68
69
|
"type": "module",
|
|
69
70
|
"types": "./dist/index.d.ts",
|
|
70
|
-
"version": "0.
|
|
71
|
+
"version": "1.0.0"
|
|
71
72
|
}
|