Skip to content

Commit 1aabfd0

Browse files
Eli Skeggsbrettz9
Eli Skeggs
authored andcommitted
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 c1b5b46 commit 1aabfd0

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
@@ -124,6 +124,35 @@ export default {
124124
*/
125125
function quux () {
126126
127+
}
128+
`,
129+
},
130+
{
131+
code: `
132+
/**
133+
* Beep
134+
* Boop
135+
*
136+
* @returns {number}
137+
*/
138+
function quux () {
139+
140+
}
141+
`,
142+
errors: [
143+
{
144+
message: 'Types are not permitted on @returns.',
145+
},
146+
],
147+
output: `
148+
/**
149+
* Beep
150+
* Boop
151+
*
152+
* @returns
153+
*/
154+
function quux () {
155+
127156
}
128157
`,
129158
},

0 commit comments

Comments
 (0)