@stylistic/eslint-plugin-jsx
Advanced tools
Comparing version 1.8.0 to 1.8.1
@@ -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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
151409
4051
0