Skip to content

Commit

Permalink
Add multiline workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
renatho committed May 18, 2021
1 parent 9af6e36 commit 7965ab8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/alignTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ const alignTransform = (tags, indent, preserveMainDescriptionPostDelimiter) => {
}
}

if (tokens.tag === '' && (tokens.type || tokens.name)) {
return tokens;
}

tokens.postDelimiter = nothingAfter.delim ? '' : ' ';

if (!nothingAfter.tag) {
Expand Down
11 changes: 11 additions & 0 deletions test/rules/assertions/checkLineAlignment.js
Original file line number Diff line number Diff line change
Expand Up @@ -1255,5 +1255,16 @@ export default {
preserveMainDescriptionPostDelimiter: true,
}],
},
{
code: `
/**
* @param {{
* ids: number[]
* }} params
*/
const fn = ({ids}) => {}
`,
options: ['always'],
},
],
};

0 comments on commit 7965ab8

Please sign in to comment.