Skip to content

Commit f2cd7ab

Browse files
author
Eli Skeggs
committed
test(no-types): check the fix for no-types preserves asterisks
Currently, the fix for `no-types` results in the removal of some asterisks from multiline descriptions. This makes eslint-plugin-jsdoc somewhat jarring to adopt.
1 parent 6014360 commit f2cd7ab

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

test/rules/assertions/noTypes.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,35 @@ export default {
4343
*/
4444
function quux () {
4545
46+
}
47+
`,
48+
},
49+
{
50+
code: `
51+
/**
52+
* Beep
53+
* Boop
54+
*
55+
* @returns {number}
56+
*/
57+
function quux () {
58+
59+
}
60+
`,
61+
errors: [
62+
{
63+
message: 'Types are not permitted on @returns.',
64+
},
65+
],
66+
output: `
67+
/**
68+
* Beep
69+
* Boop
70+
*
71+
* @returns
72+
*/
73+
function quux () {
74+
4675
}
4776
`,
4877
},

0 commit comments

Comments
 (0)