Socket
Socket
Sign inDemoInstall

@stylistic/eslint-plugin-jsx

Package Overview
Dependencies
Maintainers
1
Versions
54
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 1.8.0 to 1.8.1

9

dist/jsx-one-expression-per-line.js

@@ -62,12 +62,13 @@ 'use strict';

const lastChild = children[children.length - 1];
let lineDifference = lastChild.loc.end.line - firstChild.loc.start.line;
const lineDifference = lastChild.loc.end.line - firstChild.loc.start.line;
let lineBreaks = 0;
if (firstChild.type === "Literal" || firstChild.type === "JSXText") {
if (/^\s*?\n/.test(firstChild.raw))
lineDifference -= 1;
lineBreaks += 1;
}
if (lastChild.type === "Literal" || lastChild.type === "JSXText") {
if (/\n\s*?$/.test(lastChild.raw))
lineDifference -= 1;
lineBreaks += 1;
}
if (lineDifference === 0)
if (lineDifference === 0 && lineBreaks === 0 || lineDifference === 2 && lineBreaks === 2)
return;

@@ -74,0 +75,0 @@ }

{
"name": "@stylistic/eslint-plugin-jsx",
"version": "1.8.0",
"version": "1.8.1",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",

@@ -65,3 +65,3 @@ "license": "MIT",

"picomatch": "^4.0.2",
"@stylistic/eslint-plugin-js": "^1.8.0"
"@stylistic/eslint-plugin-js": "^1.8.1"
},

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

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