New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect error position and destructive autofix when newline-after-description is never #328
Comments
I also noticed that sometimes when |
Thanks for the report. In future issues, please paste the problematic jsdoc blocks. |
🎉 This issue has been resolved in version 15.3.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The issue in this case (for "always" or "never") was that we were looking for the last line out of the whole jsdoc block (including the tags) whose description included, rather than being an exact match for, the text, so in your example, the "A." description of As with other fixer issues, this kind of mistake should be caught be applying a stringifier to fixed JSDoc JSON, rather than reimplementing string parsing for each fixer. |
* master: (46 commits) feat(require-description-complete-sentence): limit checking to certain default tags likely to have descriptions or by `tags` array for additional choices; fixes gajus#337 docs(newline-after-description): indicate applies on doc block docs(match-description): add alias `desc` to separate column docs(match-description): indicate application by default to `description`/`desc` and allowance for `property`/`prop`; clarify fix(match-description): ensure `prop` and `property` matching excludes name testing(require-param): fix test source (part of gajus#332) testing(require-param): fix test expectation (part of gajus#332) docs: generate docs chore: update devDeps (eslint-config-canonical, gitdown) fix(no-undefined-types): ensure working in all contexts; fixes gajus#324 refactor(iterateJsdoc): reduce retrieval calls docs(check-examples): allow for whitespace at end feat(check-examples): add `paddedIndent` option fix(check-examples): preserve whitespace so as to report issues with whitespace-related rules such as `indent` (fixes gajus#211) chore(travis): fix Travis to use older unicorn version that supports Node 6 (and the canonical config that requires the earlier unicorn version) docs(require-returns, require-returns-check): indicate that these will report if multiple `returns` tags are present refactor: use `String.prototype.repeat` over lodash `repeat` refactor: apply (jsdoc-related) eslint rule fixes chore: add `lint-fix` script fix(newline-after-description): avoid matching duplicate or partial matches within tag descriptions after the block description; fixes gajus#328 ...
This is possible now that gajus/eslint-plugin-jsdoc#328 is fixed.
🎉 This issue has been resolved in version 15.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
When
newline-after-description
isnever
, the error position is wrongly placed amongst tags and the autofix (each time) destructively deletes the line/tag at the end of the block, without actually fixing the error:The text was updated successfully, but these errors were encountered: