eslint-plugin-react-dom 2.7.2 → 2.7.3-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +11 -11
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ var __exportAll = (all, symbols) => {
23
23
  //#endregion
24
24
  //#region package.json
25
25
  var name$2 = "eslint-plugin-react-dom";
26
- var version = "2.7.2";
26
+ var version = "2.7.3-beta.2";
27
27
 
28
28
  //#endregion
29
29
  //#region src/utils/create-jsx-element-resolver.ts
@@ -282,8 +282,8 @@ var no_missing_button_type_default = createRule({
282
282
  docs: { description: "Enforces an explicit 'type' attribute for 'button' elements." },
283
283
  hasSuggestions: true,
284
284
  messages: {
285
- addButtonType: "Add 'type' attribute with value '{{type}}'.",
286
- noMissingButtonType: "Add missing 'type' attribute on 'button' component."
285
+ addTypeAttribute: "Add type attribute with value '{{ type }}'.",
286
+ missingTypeAttribute: "Missing an explicit type attribute for button."
287
287
  },
288
288
  schema: []
289
289
  },
@@ -297,10 +297,10 @@ function create$12(context) {
297
297
  if (resolver.resolve(node).domElementType !== "button") return;
298
298
  if (getJsxAttribute(context, node)("type") != null) return;
299
299
  context.report({
300
- messageId: "noMissingButtonType",
300
+ messageId: "missingTypeAttribute",
301
301
  node: node.openingElement,
302
302
  suggest: BUTTON_TYPES.map((type) => ({
303
- messageId: "addButtonType",
303
+ messageId: "addTypeAttribute",
304
304
  data: { type },
305
305
  fix: (fixer) => fixer.insertTextAfter(node.openingElement.name, ` type="${type}"`)
306
306
  }))
@@ -318,8 +318,8 @@ var no_missing_iframe_sandbox_default = createRule({
318
318
  fixable: "code",
319
319
  hasSuggestions: true,
320
320
  messages: {
321
- addIframeSandbox: "Add 'sandbox' prop with value '{{value}}'.",
322
- noMissingIframeSandbox: "Add missing 'sandbox' prop on 'iframe' component."
321
+ addSandboxAttribute: "Add sandbox attribute with value '{{ value }}'.",
322
+ missingSandboxAttribute: "Missing an explicit sandbox attribute for iframe."
323
323
  },
324
324
  schema: []
325
325
  },
@@ -335,10 +335,10 @@ function create$11(context) {
335
335
  const sandboxProp = getJsxAttribute(context, node)("sandbox");
336
336
  if (sandboxProp == null) {
337
337
  context.report({
338
- messageId: "noMissingIframeSandbox",
338
+ messageId: "missingSandboxAttribute",
339
339
  node: node.openingElement,
340
340
  suggest: [{
341
- messageId: "addIframeSandbox",
341
+ messageId: "addSandboxAttribute",
342
342
  data: { value: "" },
343
343
  fix(fixer) {
344
344
  return fixer.insertTextAfter(node.openingElement.name, ` sandbox=""`);
@@ -350,10 +350,10 @@ function create$11(context) {
350
350
  const sandboxValue = resolveJsxAttributeValue(context, sandboxProp);
351
351
  if (typeof sandboxValue.toStatic("sandbox") === "string") return;
352
352
  context.report({
353
- messageId: "noMissingIframeSandbox",
353
+ messageId: "missingSandboxAttribute",
354
354
  node: sandboxValue.node ?? sandboxProp,
355
355
  suggest: [{
356
- messageId: "addIframeSandbox",
356
+ messageId: "addSandboxAttribute",
357
357
  data: { value: "" },
358
358
  fix(fixer) {
359
359
  if (sandboxValue.kind.startsWith("spread")) return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-dom",
3
- "version": "2.7.2",
3
+ "version": "2.7.3-beta.2",
4
4
  "description": "ESLint React's ESLint plugin for React DOM related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -44,11 +44,11 @@
44
44
  "compare-versions": "^6.1.1",
45
45
  "string-ts": "^2.3.1",
46
46
  "ts-pattern": "^5.9.0",
47
- "@eslint-react/ast": "2.7.2",
48
- "@eslint-react/eff": "2.7.2",
49
- "@eslint-react/shared": "2.7.2",
50
- "@eslint-react/var": "2.7.2",
51
- "@eslint-react/core": "2.7.2"
47
+ "@eslint-react/ast": "2.7.3-beta.2",
48
+ "@eslint-react/core": "2.7.3-beta.2",
49
+ "@eslint-react/eff": "2.7.3-beta.2",
50
+ "@eslint-react/shared": "2.7.3-beta.2",
51
+ "@eslint-react/var": "2.7.3-beta.2"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/react": "^19.2.8",