eslint-plugin-complete 1.1.0 → 1.1.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,oBAAoB,UAAO,GAC1B,MAAM,CAyRR"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,oBAAoB,UAAO,GAC1B,MAAM,CAsSR"}
package/dist/format.js CHANGED
@@ -59,8 +59,17 @@ export function formatText(text, maxLength, shouldParseJSDocTags = true) {
59
59
  const previousLineEndedInColon = previousLine !== undefined && previousLine.trimEnd().endsWith(":");
60
60
  const previousLineWasSeparatorLine = previousLine !== undefined && isSeparatorLine(previousLine);
61
61
  const previousLineWasEnumBlockLabel = previousLine !== undefined && isEnumBlockLabel(previousLine);
62
+ const nextLine = lines[i + 1];
63
+ const nextLineIsJSDocTag = nextLine !== undefined && nextLine.trim().startsWith("@");
62
64
  // Handle blank lines.
63
65
  if (lineIsBlank) {
66
+ // If we are between JSDoc tags, skip this blank line entirely.
67
+ if (encounteredJSDocTags
68
+ && insideList !== undefined
69
+ && insideList.kind === ListKind.JSDocTag
70
+ && nextLineIsJSDocTag) {
71
+ continue;
72
+ }
64
73
  // Append the partial line that we were building, if any.
65
74
  [formattedLine, formattedText] = appendLineToText(formattedLine, formattedText);
66
75
  // Append the blank line, but ignore multiple blank lines in a row (unless we are inside of a
@@ -92,7 +101,6 @@ export function formatText(text, maxLength, shouldParseJSDocTags = true) {
92
101
  formattedLine += line;
93
102
  // Enforce newlines after the end of code blocks. (But not inside of an example code block,
94
103
  // because there should not be newlines between tags.)
95
- const nextLine = lines[i + 1];
96
104
  const nextLineIsBlank = nextLine === undefined || nextLine.trim() === "";
97
105
  if (hasCodeBlock
98
106
  && previousLineInsideCodeBlock
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ export default plugin;
20
20
  * We parse the package JSON manually since importing JSON files directly in Node is experimental.
21
21
  */
22
22
  function getPackageJSONNameAndVersion() {
23
- const packageRoot = path.join(import.meta.dirname, "..");
23
+ const packageRoot = path.resolve(import.meta.dirname, "..");
24
24
  const packageJSONPath = path.join(packageRoot, "package.json");
25
25
  let packageJSON;
26
26
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-complete",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "An ESLint plugin that contains useful rules.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -44,22 +44,22 @@
44
44
  "test": "jest"
45
45
  },
46
46
  "dependencies": {
47
- "@typescript-eslint/type-utils": "8.34.1",
48
- "@typescript-eslint/utils": "8.34.1",
49
- "typescript-eslint": "8.34.1"
47
+ "@typescript-eslint/type-utils": "8.35.1",
48
+ "@typescript-eslint/utils": "8.35.1",
49
+ "typescript-eslint": "8.35.1"
50
50
  },
51
51
  "devDependencies": {
52
- "@babel/core": "7.27.4",
53
- "@babel/preset-env": "7.27.2",
52
+ "@babel/core": "7.28.0",
53
+ "@babel/preset-env": "7.28.0",
54
54
  "@babel/preset-typescript": "7.27.1",
55
55
  "@types/jest": "30.0.0",
56
- "@types/node": "24.0.3",
57
- "@typescript-eslint/rule-tester": "8.34.1",
58
- "@typescript-eslint/types": "8.34.1",
59
- "complete-common": "2.2.0",
60
- "complete-node": "5.1.6",
61
- "jest": "30.0.2",
62
- "prettier": "3.5.3",
56
+ "@types/node": "24.0.10",
57
+ "@typescript-eslint/rule-tester": "8.35.1",
58
+ "@typescript-eslint/types": "8.35.1",
59
+ "complete-common": "2.3.1",
60
+ "complete-node": "7.4.0",
61
+ "jest": "30.0.4",
62
+ "prettier": "3.6.2",
63
63
  "typescript": "5.8.3"
64
64
  },
65
65
  "peerDependencies": {