You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

eslint-plugin-react-dom

Package Overview
Dependencies
Maintainers
1
Versions
1418
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-dom - npm Package Compare versions

Comparing version

to
2.0.0-next.121

15

dist/index.js

@@ -5,3 +5,2 @@ import { getDocsUrl, getSettingsFromContext, DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';

import { unit } from '@eslint-react/eff';
import * as AST from '@eslint-react/ast';
import { AST_NODE_TYPES } from '@typescript-eslint/types';

@@ -48,3 +47,3 @@ import { compare } from 'compare-versions';

var name2 = "eslint-plugin-react-dom";
var version = "2.0.0-next.120";
var version = "2.0.0-next.121";
function createJsxElementResolver(context) {

@@ -191,3 +190,3 @@ const { components, polymorphicPropName } = getSettingsFromContext(context);

const initialScope = context.sourceCode.getScope(node);
const hasChildren = hasChildrenWithin(node) || ER.hasAttribute(context, "children", attributes, initialScope);
const hasChildren = node.children.some(isSignificantChildren) || ER.hasAttribute(context, "children", attributes, initialScope);
if (hasChildren && ER.hasAttribute(context, dangerouslySetInnerHTML2, attributes, initialScope)) {

@@ -202,5 +201,11 @@ context.report({

}
function hasChildrenWithin(node) {
return node.children.length > 0 && node.children[0] != null && !AST.isLineBreak(node.children[0]);
function isWhiteSpace(node) {
return typeof node.value === "string" && node.raw.trim() === "";
}
function isPaddingSpaces(node) {
return ER.isJsxText(node) && isWhiteSpace(node) && node.raw.includes("\n");
}
function isSignificantChildren(node) {
return node.type !== AST_NODE_TYPES.JSXText || !isPaddingSpaces(node);
}
var RULE_NAME3 = "no-find-dom-node";

@@ -207,0 +212,0 @@ var RULE_FEATURES3 = [];

{
"name": "eslint-plugin-react-dom",
"version": "2.0.0-next.120",
"version": "2.0.0-next.121",
"description": "ESLint React's ESLint plugin for React DOM related rules.",

@@ -44,8 +44,8 @@ "keywords": [

"ts-pattern": "^5.8.0",
"@eslint-react/ast": "2.0.0-next.120",
"@eslint-react/core": "2.0.0-next.120",
"@eslint-react/eff": "2.0.0-next.120",
"@eslint-react/shared": "2.0.0-next.120",
"@eslint-react/kit": "2.0.0-next.120",
"@eslint-react/var": "2.0.0-next.120"
"@eslint-react/ast": "2.0.0-next.121",
"@eslint-react/core": "2.0.0-next.121",
"@eslint-react/kit": "2.0.0-next.121",
"@eslint-react/eff": "2.0.0-next.121",
"@eslint-react/shared": "2.0.0-next.121",
"@eslint-react/var": "2.0.0-next.121"
},

@@ -52,0 +52,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.