Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stylistic/eslint-plugin-jsx

Package Overview
Dependencies
Maintainers
0
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylistic/eslint-plugin-jsx - npm Package Compare versions

Comparing version 2.11.0 to 2.12.0

13

dist/rules/jsx-wrap-multilines.js

@@ -102,3 +102,3 @@ 'use strict';

}
function trimTokenBeforeNewline(node, tokenBefore) {
function trimTokenBeforeNewline(tokenBefore) {
const isBracket = tokenBefore.value === "{" || tokenBefore.value === "[";

@@ -121,6 +121,8 @@ return `${tokenBefore.value.trim()}${isBracket ? "" : " "}`;

if (!utils.isParenthesized(node, context.sourceCode)) {
const tokenBefore = sourceCode.getTokenBefore(node, { includeComments: true });
const tokenAfter = sourceCode.getTokenAfter(node, { includeComments: true });
const tokenBefore = sourceCode.getTokenBefore(node);
const tokenAfter = sourceCode.getTokenAfter(node);
const start = node.loc.start;
if (tokenBefore.loc.end.line < start.line) {
const textBetween = sourceCode.getText().slice(tokenBefore.range[1], node.range[0]).trim();
const indent = start.column > 0 ? " ".repeat(start.column) : "";
context.report({

@@ -134,4 +136,5 @@ node,

],
`${trimTokenBeforeNewline(node, tokenBefore)}(
${start.column > 0 ? " ".repeat(start.column) : ""}${sourceCode.getText(node)}
`${trimTokenBeforeNewline(tokenBefore)}(
${indent}${textBetween}${textBetween.length > 0 ? `
${indent}` : ""}${sourceCode.getText(node)}
${start.column > 0 ? " ".repeat(start.column - 2) : ""})`

@@ -138,0 +141,0 @@ )

{
"name": "@stylistic/eslint-plugin-jsx",
"type": "commonjs",
"version": "2.11.0",
"version": "2.12.0",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc