eslint-plugin-react-dom 5.26.1 → 5.26.2
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 +11 -11
- 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-dom";
|
|
23
|
-
var version = "5.26.
|
|
23
|
+
var version = "5.26.2";
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/utils/create-rule.ts
|
|
26
26
|
function getDocsUrl(ruleName) {
|
|
@@ -308,8 +308,8 @@ var no_missing_button_type_default = createRule({
|
|
|
308
308
|
docs: { description: "Enforces an explicit 'type' attribute for 'button' elements." },
|
|
309
309
|
hasSuggestions: true,
|
|
310
310
|
messages: {
|
|
311
|
-
|
|
312
|
-
"
|
|
311
|
+
default: "Missing an explicit type attribute for button.",
|
|
312
|
+
suggest: "Add type attribute with value '{{ type }}'."
|
|
313
313
|
},
|
|
314
314
|
schema: []
|
|
315
315
|
},
|
|
@@ -323,14 +323,14 @@ function create$10(context) {
|
|
|
323
323
|
if (domElementType !== "button") return;
|
|
324
324
|
if (hasAttribute(context, node, "type")) return;
|
|
325
325
|
context.report({
|
|
326
|
-
messageId: "
|
|
326
|
+
messageId: "default",
|
|
327
327
|
node: node.openingElement,
|
|
328
328
|
suggest: BUTTON_TYPES.map((type) => ({
|
|
329
329
|
data: { type },
|
|
330
330
|
fix(fixer) {
|
|
331
331
|
return fixer.insertTextAfter(node.openingElement.name, ` type="${type}"`);
|
|
332
332
|
},
|
|
333
|
-
messageId: "
|
|
333
|
+
messageId: "suggest"
|
|
334
334
|
}))
|
|
335
335
|
});
|
|
336
336
|
} };
|
|
@@ -342,8 +342,8 @@ var no_missing_iframe_sandbox_default = createRule({
|
|
|
342
342
|
fixable: "code",
|
|
343
343
|
hasSuggestions: true,
|
|
344
344
|
messages: {
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
default: "Missing an explicit sandbox attribute for iframe.",
|
|
346
|
+
suggest: "Add sandbox attribute with value '{{ value }}'."
|
|
347
347
|
},
|
|
348
348
|
schema: []
|
|
349
349
|
},
|
|
@@ -358,14 +358,14 @@ function create$9(context) {
|
|
|
358
358
|
const sandboxProp = findAttribute(context, node, "sandbox");
|
|
359
359
|
if (sandboxProp == null) {
|
|
360
360
|
context.report({
|
|
361
|
-
messageId: "
|
|
361
|
+
messageId: "default",
|
|
362
362
|
node: node.openingElement,
|
|
363
363
|
suggest: [{
|
|
364
364
|
data: { value: "" },
|
|
365
365
|
fix(fixer) {
|
|
366
366
|
return fixer.insertTextAfter(node.openingElement.name, ` sandbox=""`);
|
|
367
367
|
},
|
|
368
|
-
messageId: "
|
|
368
|
+
messageId: "suggest"
|
|
369
369
|
}]
|
|
370
370
|
});
|
|
371
371
|
return;
|
|
@@ -373,7 +373,7 @@ function create$9(context) {
|
|
|
373
373
|
const sandboxValue = resolveAttributeValue(context, sandboxProp, "sandbox");
|
|
374
374
|
if (isString(sandboxValue.toStatic())) return;
|
|
375
375
|
context.report({
|
|
376
|
-
messageId: "
|
|
376
|
+
messageId: "default",
|
|
377
377
|
node: sandboxValue.node ?? sandboxProp,
|
|
378
378
|
suggest: [{
|
|
379
379
|
data: { value: "" },
|
|
@@ -381,7 +381,7 @@ function create$9(context) {
|
|
|
381
381
|
if (sandboxValue.kind === "spreadProps") return null;
|
|
382
382
|
return fixer.replaceText(sandboxProp, `sandbox=""`);
|
|
383
383
|
},
|
|
384
|
-
messageId: "
|
|
384
|
+
messageId: "suggest"
|
|
385
385
|
}]
|
|
386
386
|
});
|
|
387
387
|
} };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-dom",
|
|
3
|
-
"version": "5.26.
|
|
3
|
+
"version": "5.26.2",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for DOM related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eslint-react/ast": "5.26.
|
|
41
|
-
"@eslint-react/eslint": "5.26.
|
|
42
|
-
"@eslint-react/jsx": "5.26.
|
|
43
|
-
"@eslint-react/shared": "5.26.
|
|
44
|
-
"@eslint-react/var": "5.26.
|
|
40
|
+
"@eslint-react/ast": "5.26.2",
|
|
41
|
+
"@eslint-react/eslint": "5.26.2",
|
|
42
|
+
"@eslint-react/jsx": "5.26.2",
|
|
43
|
+
"@eslint-react/shared": "5.26.2",
|
|
44
|
+
"@eslint-react/var": "5.26.2",
|
|
45
45
|
"@typescript-eslint/types": "^8.71.1",
|
|
46
46
|
"@typescript-eslint/utils": "^8.71.1",
|
|
47
47
|
"compare-versions": "^6.1.1",
|