eslint-plugin-react-dom
Advanced tools
Comparing version 1.24.0-next.0 to 1.24.0-next.1
'use strict'; | ||
var JSX3 = require('@eslint-react/jsx'); | ||
var eff = require('@eslint-react/eff'); | ||
var JSX3 = require('@eslint-react/jsx'); | ||
var VAR = require('@eslint-react/var'); | ||
@@ -37,3 +37,3 @@ var tsPattern = require('ts-pattern'); | ||
var name = "eslint-plugin-react-dom"; | ||
var version = "1.24.0-next.0"; | ||
var version = "1.24.0-next.1"; | ||
function getAdditionalAttributes(name2, additionalComponents) { | ||
@@ -50,3 +50,3 @@ return additionalComponents.findLast((c) => c.name === name2 || c.re.test(name2))?.attributes ?? []; | ||
); | ||
if (actualAttributeNode === eff._) return attributeConfig?.defaultValue; | ||
if (actualAttributeNode == null) return attributeConfig?.defaultValue; | ||
const actualAttributeScope = context.sourceCode.getScope(actualAttributeNode); | ||
@@ -82,3 +82,3 @@ const actualAttributeValue = JSX3__namespace.getPropValue(actualAttributeNode, actualAttributeScope); | ||
const prop = JSX3__namespace.getProp("dangerouslySetInnerHTML", context.sourceCode.getScope(node), attributes); | ||
if (prop === eff._) return; | ||
if (prop == null) return; | ||
context.report({ | ||
@@ -274,3 +274,3 @@ messageId: "noDangerouslySetInnerhtml", | ||
const sandboxValue = getPropValue3("sandbox"); | ||
if (sandboxValue === eff._) { | ||
if (sandboxValue == null) { | ||
context.report({ | ||
@@ -1519,3 +1519,3 @@ messageId: "noMissingIframeSandbox", | ||
const sandboxValue = getPropValue3("sandbox"); | ||
if (sandboxValue === eff._) return; | ||
if (sandboxValue == null) return; | ||
const values = sandboxValue.split(" "); | ||
@@ -1538,7 +1538,7 @@ if (unsafeCombinations.some((unsafes) => unsafes.every((x) => values.includes(x)))) { | ||
function isExternalLinkLike(value) { | ||
if (value === eff._) return false; | ||
if (value == null) return false; | ||
return value.startsWith("https://") || /^(?:\w+:|\/\/)/u.test(value); | ||
} | ||
function isSafeRel(value) { | ||
if (value === eff._) return false; | ||
if (value == null) return false; | ||
return value === "noreferrer" || /\bnoreferrer\b/u.test(value); | ||
@@ -1649,3 +1649,3 @@ } | ||
const initialScope = context.sourceCode.getScope(node); | ||
const hasAttribute = (name2) => JSX3__namespace.findPropInAttributes(name2, initialScope, attributes) !== eff._; | ||
const hasAttribute = (name2) => JSX3__namespace.findPropInAttributes(name2, initialScope, attributes) != null; | ||
if (hasAttribute("children") || hasAttribute("dangerouslySetInnerHTML")) { | ||
@@ -1652,0 +1652,0 @@ context.report({ |
{ | ||
"name": "eslint-plugin-react-dom", | ||
"version": "1.24.0-next.0", | ||
"version": "1.24.0-next.1", | ||
"description": "ESLint React's ESLint plugin for React DOM related rules.", | ||
@@ -50,13 +50,13 @@ "keywords": [ | ||
"ts-pattern": "^5.6.0", | ||
"@eslint-react/ast": "1.24.0-next.0", | ||
"@eslint-react/core": "1.24.0-next.0", | ||
"@eslint-react/eff": "1.24.0-next.0", | ||
"@eslint-react/jsx": "1.24.0-next.0", | ||
"@eslint-react/types": "1.24.0-next.0", | ||
"@eslint-react/var": "1.24.0-next.0", | ||
"@eslint-react/shared": "1.24.0-next.0" | ||
"@eslint-react/ast": "1.24.0-next.1", | ||
"@eslint-react/eff": "1.24.0-next.1", | ||
"@eslint-react/core": "1.24.0-next.1", | ||
"@eslint-react/shared": "1.24.0-next.1", | ||
"@eslint-react/jsx": "1.24.0-next.1", | ||
"@eslint-react/types": "1.24.0-next.1", | ||
"@eslint-react/var": "1.24.0-next.1" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^19.0.4", | ||
"@types/react-dom": "^19.0.2", | ||
"@types/react": "^19.0.5", | ||
"@types/react-dom": "^19.0.3", | ||
"tsup": "^8.3.5", | ||
@@ -63,0 +63,0 @@ "@workspace/configs": "0.0.0" |
Sorry, the diff of this file is not supported yet
+ Added@eslint-react/ast@1.24.0-next.1(transitive)
+ Added@eslint-react/core@1.24.0-next.1(transitive)
+ Added@eslint-react/eff@1.24.0-next.1(transitive)
+ Added@eslint-react/jsx@1.24.0-next.1(transitive)
+ Added@eslint-react/shared@1.24.0-next.1(transitive)
+ Added@eslint-react/types@1.24.0-next.1(transitive)
+ Added@eslint-react/var@1.24.0-next.1(transitive)
- Removed@eslint-react/ast@1.24.0-next.0(transitive)
- Removed@eslint-react/core@1.24.0-next.0(transitive)
- Removed@eslint-react/eff@1.24.0-next.0(transitive)
- Removed@eslint-react/jsx@1.24.0-next.0(transitive)
- Removed@eslint-react/shared@1.24.0-next.0(transitive)
- Removed@eslint-react/types@1.24.0-next.0(transitive)
- Removed@eslint-react/var@1.24.0-next.0(transitive)