@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.
- package/dist/comments/core.js +0 -8
- package/dist/comments/wrap.js +1 -2
- package/package.json +1 -1
package/dist/comments/core.js
CHANGED
|
@@ -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) {
|
package/dist/comments/wrap.js
CHANGED
|
@@ -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
|
|
118
|
-
!isStandaloneLineComment(text, comment) ||
|
|
117
|
+
!isStandaloneComment(text, comment) ||
|
|
119
118
|
!isPrettierIgnoreComment(getCommentBody(text, comment))) {
|
|
120
119
|
continue;
|
|
121
120
|
}
|
package/package.json
CHANGED