@aforemendude/prettier-plugin-wrap-comments 1.0.4 → 1.0.5

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.
@@ -22,14 +22,6 @@ export function toCommentRange(comment, text) {
22
22
  if (rawStart.startsWith('/*')) {
23
23
  return { end, kind: 'block', start };
24
24
  }
25
- if (typeof comment.type === 'string') {
26
- if (comment.type.includes('Line')) {
27
- return { end, kind: 'line', start };
28
- }
29
- if (comment.type.includes('Block')) {
30
- return { end, kind: 'block', start };
31
- }
32
- }
33
25
  return undefined;
34
26
  }
35
27
  export function normalizeLineCommentBody(rawBody) {
@@ -114,8 +114,7 @@ function collectPrettierIgnoredLineRanges(text, ast, comments) {
114
114
  for (let index = 0; index < comments.length; index += 1) {
115
115
  const comment = comments[index]?.range;
116
116
  if (comment === undefined ||
117
- comment.kind !== 'line' ||
118
- !isStandaloneLineComment(text, comment) ||
117
+ !isStandaloneComment(text, comment) ||
119
118
  !isPrettierIgnoreComment(getCommentBody(text, comment))) {
120
119
  continue;
121
120
  }
package/package.json CHANGED
@@ -51,5 +51,5 @@
51
51
  },
52
52
  "type": "module",
53
53
  "types": "./dist/index.d.ts",
54
- "version": "1.0.4"
54
+ "version": "1.0.5"
55
55
  }