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

eslint-plugin-isaacscript

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-isaacscript - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

9

dist/rules/limit-jsdoc-comments.js

@@ -213,4 +213,11 @@ "use strict";

const singleLineLength = leftWhitespaceLength + "/** ".length + text.length + " */".length;
// JSDoc comments that specify parameter documentation should never be moved to a single line
const hasJSDocTag = text.startsWith("@");
return singleLineLength <= maxLength && !hasJSDocTag;
if (hasJSDocTag) {
const tagHasSomethingAfterIt = text.includes(" ");
if (tagHasSomethingAfterIt) {
return false;
}
}
return singleLineLength <= maxLength;
}

@@ -217,0 +224,0 @@ function getFormattedJSDocCommentSingleLine(text, leftWhitespace) {

44

dist/rules/limit-slash-slash-comments.js

@@ -144,23 +144,27 @@ "use strict";

const firstCommentStartLine = comment.loc.start.line;
// Look for one or more "connecting" comments on the next subsequent lines
for (let j = i + 1; j < comments.length; j++) {
const nextComment = comments[j];
if (nextComment === undefined) {
break;
// Ignore "block" comments
const hasAllHyphens = /^\s*-+\s*$/.test(text);
if (!hasAllHyphens) {
// Look for one or more "connecting" comments on the next subsequent lines
for (let j = i + 1; j < comments.length; j++) {
const nextComment = comments[j];
if (nextComment === undefined) {
break;
}
// Break if we are on a non-contiguous line
const nextCommentStartLine = nextComment.loc.start.line;
const lineDelta = j - commentIndex;
if (nextCommentStartLine !== firstCommentStartLine + lineDelta) {
break;
}
// Break if the next line starts with a bullet point
if ((0, comments_1.startsWithBulletPoint)(nextComment.value)) {
break;
}
commentBlock.mergedText += " ";
commentBlock.mergedText += nextComment.value.trim();
commentBlock.originalComments.push(nextComment);
// Since we merged this comment, we can skip over examining it in the parent for loop
i += 1;
}
// Break if we are on a non-contiguous line
const nextCommentStartLine = nextComment.loc.start.line;
const lineDelta = j - commentIndex;
if (nextCommentStartLine !== firstCommentStartLine + lineDelta) {
break;
}
// Break if the next line starts with a bullet point
if ((0, comments_1.startsWithBulletPoint)(nextComment.value)) {
break;
}
commentBlock.mergedText += " ";
commentBlock.mergedText += nextComment.value.trim();
commentBlock.originalComments.push(nextComment);
// Since we merged this comment, we can skip over examining it in the parent for loop
i += 1;
}

@@ -167,0 +171,0 @@ commentBlocks.push(commentBlock);

{
"name": "eslint-plugin-isaacscript",
"version": "1.0.8",
"version": "1.0.9",
"description": "",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/Zamiell/eslint-plugin-isaacscript",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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