eslint-plugin-react-jsx 5.9.5 → 5.10.1
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/index.js +10 -10
- package/package.json +11 -12
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region package.json
|
|
28
28
|
var name$2 = "eslint-plugin-react-jsx";
|
|
29
|
-
var version = "5.
|
|
29
|
+
var version = "5.10.1";
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/utils/create-rule.ts
|
|
@@ -295,7 +295,7 @@ function create$5(context) {
|
|
|
295
295
|
if (isOneOf([AST_NODE_TYPES.JSXAttribute, AST_NODE_TYPES.JSXExpressionContainer])(node.parent)) return false;
|
|
296
296
|
return /^\s*\/(?:\/|\*)/mu.test(context.sourceCode.getText(node));
|
|
297
297
|
}
|
|
298
|
-
const
|
|
298
|
+
const visit = (node) => {
|
|
299
299
|
if (!Check.isJSXElementOrFragment(node.parent)) return;
|
|
300
300
|
if (!hasCommentLike(node)) return;
|
|
301
301
|
context.report({
|
|
@@ -304,8 +304,8 @@ function create$5(context) {
|
|
|
304
304
|
});
|
|
305
305
|
};
|
|
306
306
|
return {
|
|
307
|
-
JSXText:
|
|
308
|
-
Literal:
|
|
307
|
+
JSXText: visit,
|
|
308
|
+
Literal: visit
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
311
|
|
|
@@ -366,7 +366,7 @@ function create$3(context) {
|
|
|
366
366
|
* Visitor function for JSXElement and JSXFragment nodes
|
|
367
367
|
* @param node The JSXElement or JSXFragment node to be checked
|
|
368
368
|
*/
|
|
369
|
-
const
|
|
369
|
+
const visit = (node) => {
|
|
370
370
|
for (const [index, child] of node.children.entries()) {
|
|
371
371
|
if (child.type !== AST_NODE_TYPES.JSXText || !child.value.endsWith("$")) continue;
|
|
372
372
|
if (node.children[index + 1]?.type !== AST_NODE_TYPES.JSXExpressionContainer) continue;
|
|
@@ -395,8 +395,8 @@ function create$3(context) {
|
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
397
|
return {
|
|
398
|
-
JSXElement:
|
|
399
|
-
JSXFragment:
|
|
398
|
+
JSXElement: visit,
|
|
399
|
+
JSXFragment: visit
|
|
400
400
|
};
|
|
401
401
|
}
|
|
402
402
|
|
|
@@ -422,7 +422,7 @@ function hasLeakedSemicolon(text) {
|
|
|
422
422
|
return text.startsWith(";\n") || text.startsWith(";\r");
|
|
423
423
|
}
|
|
424
424
|
function create$2(context) {
|
|
425
|
-
const
|
|
425
|
+
const visit = (node) => {
|
|
426
426
|
if (!Check.isJSXElementOrFragment(node.parent)) return;
|
|
427
427
|
if (!hasLeakedSemicolon(context.sourceCode.getText(node))) return;
|
|
428
428
|
context.report({
|
|
@@ -437,8 +437,8 @@ function create$2(context) {
|
|
|
437
437
|
});
|
|
438
438
|
};
|
|
439
439
|
return {
|
|
440
|
-
JSXText:
|
|
441
|
-
Literal:
|
|
440
|
+
JSXText: visit,
|
|
441
|
+
Literal: visit
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-jsx",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.1",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Flavored JSX rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,24 +37,23 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@typescript-eslint/types": "^8.62.
|
|
41
|
-
"@typescript-eslint/utils": "^8.62.
|
|
42
|
-
"@eslint-react/
|
|
43
|
-
"@eslint-react/ast": "5.
|
|
44
|
-
"@eslint-react/core": "5.
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/shared": "5.
|
|
40
|
+
"@typescript-eslint/types": "^8.62.1",
|
|
41
|
+
"@typescript-eslint/utils": "^8.62.1",
|
|
42
|
+
"@eslint-react/jsx": "5.10.1",
|
|
43
|
+
"@eslint-react/ast": "5.10.1",
|
|
44
|
+
"@eslint-react/core": "5.10.1",
|
|
45
|
+
"@eslint-react/eslint": "5.10.1",
|
|
46
|
+
"@eslint-react/shared": "5.10.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/react": "^19.2.17",
|
|
50
50
|
"@types/react-dom": "^19.2.3",
|
|
51
|
-
"@typescript-eslint/rule-tester": "^8.62.0",
|
|
52
51
|
"dedent": "^1.7.2",
|
|
53
|
-
"eslint": "^10.
|
|
52
|
+
"eslint": "^10.6.0",
|
|
54
53
|
"tsdown": "^0.22.3",
|
|
55
54
|
"typescript": "6.0.3",
|
|
56
|
-
"@local/
|
|
57
|
-
"@local/
|
|
55
|
+
"@local/configs": "0.0.0",
|
|
56
|
+
"@local/eff": "0.0.0"
|
|
58
57
|
},
|
|
59
58
|
"peerDependencies": {
|
|
60
59
|
"eslint": "*",
|