eslint-plugin-react-jsx 5.24.4 → 5.24.6
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 +33 -35
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region package.json
|
|
22
22
|
var name$2 = "eslint-plugin-react-jsx";
|
|
23
|
-
var version = "5.24.
|
|
23
|
+
var version = "5.24.6";
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/utils/create-rule.ts
|
|
26
26
|
function getDocsUrl(ruleName) {
|
|
@@ -48,8 +48,7 @@ var no_children_prop_with_children_default = createRule({
|
|
|
48
48
|
schema: []
|
|
49
49
|
},
|
|
50
50
|
name: "no-children-prop-with-children",
|
|
51
|
-
create: create$7
|
|
52
|
-
defaultOptions: []
|
|
51
|
+
create: create$7
|
|
53
52
|
});
|
|
54
53
|
function create$7(context) {
|
|
55
54
|
return {
|
|
@@ -106,8 +105,7 @@ var no_children_prop_default = createRule({
|
|
|
106
105
|
schema: []
|
|
107
106
|
},
|
|
108
107
|
name: "no-children-prop",
|
|
109
|
-
create: create$6
|
|
110
|
-
defaultOptions: []
|
|
108
|
+
create: create$6
|
|
111
109
|
});
|
|
112
110
|
function create$6(context) {
|
|
113
111
|
return {
|
|
@@ -184,8 +182,7 @@ var no_comment_textnodes_default = createRule({
|
|
|
184
182
|
schema: []
|
|
185
183
|
},
|
|
186
184
|
name: "no-comment-textnodes",
|
|
187
|
-
create: create$5
|
|
188
|
-
defaultOptions: []
|
|
185
|
+
create: create$5
|
|
189
186
|
});
|
|
190
187
|
function create$5(context) {
|
|
191
188
|
return { JSXText(node) {
|
|
@@ -300,8 +297,7 @@ var no_key_after_spread_default = createRule({
|
|
|
300
297
|
schema: []
|
|
301
298
|
},
|
|
302
299
|
name: "no-key-after-spread",
|
|
303
|
-
create: create$4
|
|
304
|
-
defaultOptions: []
|
|
300
|
+
create: create$4
|
|
305
301
|
});
|
|
306
302
|
function create$4(context) {
|
|
307
303
|
if (!context.sourceCode.text.includes("key=")) return {};
|
|
@@ -327,8 +323,7 @@ var no_leaked_dollar_default = createRule({
|
|
|
327
323
|
schema: []
|
|
328
324
|
},
|
|
329
325
|
name: "no-leaked-dollar",
|
|
330
|
-
create: create$3
|
|
331
|
-
defaultOptions: []
|
|
326
|
+
create: create$3
|
|
332
327
|
});
|
|
333
328
|
function create$3(context) {
|
|
334
329
|
if (!context.sourceCode.text.includes("$")) return {};
|
|
@@ -379,8 +374,7 @@ var no_leaked_semicolon_default = createRule({
|
|
|
379
374
|
schema: []
|
|
380
375
|
},
|
|
381
376
|
name: "no-leaked-semicolon",
|
|
382
|
-
create: create$2
|
|
383
|
-
defaultOptions: []
|
|
377
|
+
create: create$2
|
|
384
378
|
});
|
|
385
379
|
function create$2(context) {
|
|
386
380
|
return { JSXText(node) {
|
|
@@ -406,8 +400,7 @@ var no_namespace_default = createRule({
|
|
|
406
400
|
schema: []
|
|
407
401
|
},
|
|
408
402
|
name: "no-namespace",
|
|
409
|
-
create: create$1
|
|
410
|
-
defaultOptions: []
|
|
403
|
+
create: create$1
|
|
411
404
|
});
|
|
412
405
|
function create$1(context) {
|
|
413
406
|
return { JSXElement(node) {
|
|
@@ -420,33 +413,38 @@ function create$1(context) {
|
|
|
420
413
|
});
|
|
421
414
|
} };
|
|
422
415
|
}
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region src/rules/no-useless-fragment/no-useless-fragment.ts
|
|
418
|
+
const RULE_NAME = "no-useless-fragment";
|
|
419
|
+
const defaultOptions = [{
|
|
420
|
+
allowEmptyFragment: false,
|
|
421
|
+
allowExpressions: true
|
|
422
|
+
}];
|
|
423
|
+
const schema = [{
|
|
424
|
+
type: "object",
|
|
425
|
+
additionalProperties: false,
|
|
426
|
+
properties: {
|
|
427
|
+
allowEmptyFragment: {
|
|
428
|
+
type: "boolean",
|
|
429
|
+
description: "Allow empty fragments"
|
|
430
|
+
},
|
|
431
|
+
allowExpressions: {
|
|
432
|
+
type: "boolean",
|
|
433
|
+
description: "Allow fragments with a single expression child"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}];
|
|
423
437
|
var no_useless_fragment_default = createRule({
|
|
424
438
|
meta: {
|
|
425
439
|
type: "suggestion",
|
|
440
|
+
defaultOptions: [...defaultOptions],
|
|
426
441
|
docs: { description: "Disallows useless fragment elements." },
|
|
427
442
|
fixable: "code",
|
|
428
443
|
messages: { default: "A fragment {{reason}} is useless." },
|
|
429
|
-
schema
|
|
430
|
-
type: "object",
|
|
431
|
-
additionalProperties: false,
|
|
432
|
-
properties: {
|
|
433
|
-
allowEmptyFragment: {
|
|
434
|
-
type: "boolean",
|
|
435
|
-
description: "Allow empty fragments"
|
|
436
|
-
},
|
|
437
|
-
allowExpressions: {
|
|
438
|
-
type: "boolean",
|
|
439
|
-
description: "Allow fragments with a single expression child"
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
}]
|
|
444
|
+
schema
|
|
443
445
|
},
|
|
444
|
-
name:
|
|
445
|
-
create
|
|
446
|
-
defaultOptions: [{
|
|
447
|
-
allowEmptyFragment: false,
|
|
448
|
-
allowExpressions: true
|
|
449
|
-
}]
|
|
446
|
+
name: RULE_NAME,
|
|
447
|
+
create
|
|
450
448
|
});
|
|
451
449
|
function create(context, [option]) {
|
|
452
450
|
const options = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-jsx",
|
|
3
|
-
"version": "5.24.
|
|
3
|
+
"version": "5.24.6",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Flavored JSX rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eslint-react/ast": "5.24.
|
|
41
|
-
"@eslint-react/core": "5.24.
|
|
42
|
-
"@eslint-react/eslint": "5.24.
|
|
43
|
-
"@eslint-react/jsx": "5.24.
|
|
44
|
-
"@eslint-react/shared": "5.24.
|
|
40
|
+
"@eslint-react/ast": "5.24.6",
|
|
41
|
+
"@eslint-react/core": "5.24.6",
|
|
42
|
+
"@eslint-react/eslint": "5.24.6",
|
|
43
|
+
"@eslint-react/jsx": "5.24.6",
|
|
44
|
+
"@eslint-react/shared": "5.24.6",
|
|
45
45
|
"@typescript-eslint/types": "^8.71.0",
|
|
46
46
|
"@typescript-eslint/utils": "^8.71.0"
|
|
47
47
|
},
|