@storm-software/eslint 0.74.0 → 0.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/preset.mjs +13 -5
- package/package.json +1 -1
package/dist/preset.mjs
CHANGED
|
@@ -13446,13 +13446,21 @@ function getEOL(options) {
|
|
|
13446
13446
|
return os.EOL;
|
|
13447
13447
|
}
|
|
13448
13448
|
function hasBanner(commentType, src) {
|
|
13449
|
-
if (src.
|
|
13450
|
-
const
|
|
13451
|
-
if (
|
|
13452
|
-
|
|
13449
|
+
if (src.startsWith("#!")) {
|
|
13450
|
+
const bannerLines = src.split(/\r?\n/);
|
|
13451
|
+
if (bannerLines && bannerLines.length > 1) {
|
|
13452
|
+
bannerLines.shift();
|
|
13453
|
+
while (bannerLines.length && bannerLines[0] && !bannerLines[0].replace(/\s+/, "")) {
|
|
13454
|
+
bannerLines.shift();
|
|
13455
|
+
}
|
|
13456
|
+
if (bannerLines.length) {
|
|
13457
|
+
src = bannerLines.join("\n");
|
|
13458
|
+
} else {
|
|
13459
|
+
return false;
|
|
13460
|
+
}
|
|
13453
13461
|
}
|
|
13454
13462
|
}
|
|
13455
|
-
return commentType === "block" && src.
|
|
13463
|
+
return commentType === "block" && src.startsWith("/*") || commentType === "lint" && src.startsWith("//") || commentType !== "block" && commentType !== "lint" && commentType && src.startsWith(commentType);
|
|
13456
13464
|
}
|
|
13457
13465
|
function matchesLineEndings(src, num) {
|
|
13458
13466
|
for (let j = 0; j < num; ++j) {
|
package/package.json
CHANGED