Skip to content
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

require-description: previous line comment check #56

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JasonMore
Copy link

I figured I'd give multi line comments for require-description a try. It seems to work?

@JasonMore
Copy link
Author

@mysticatea any thoughts on this PR?

@JasonMore
Copy link
Author

@mysticatea we have been using this a few months now with great successs

@JasonMore
Copy link
Author

@goloroden yeah I've just been running a local version of this myself. However I've recently discovered https://www.npmjs.com/package/patch-package which is nice too

@bossley9
Copy link

@mysticatea any updates?

@@ -31,6 +31,8 @@ tester.run("require-description", rule, {
"/* eslint-disable-next-line -- description */",
"// eslint-disable-line eqeqeq -- description",
"// eslint-disable-next-line eqeqeq -- description",
`// some comment above
// eslint-disable-next-line eqeqeq`,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add something like

/* 
  * Some multiline comment
  */
// eslint-disable-next-line eqeqeq

... as well, just to make sure it at least is covered by tests. I can see that you look at comment.loc.end.line so it should work.

@ehellman
Copy link

Would love to get this merged too, I have written a standalone plugin for this that we are using at the moment but feels like the functionality should live here

@tylerlaprade
Copy link

Comments on different lines can be moved around by prettier or other eslint rules. The only way to guarantee you tie your description to your eslint comment is by using -- to include the comment on the same line.

@MichaelDeBoey
Copy link

Hi @JasonMore!

Since this repo is unmaintained, you might want to re-open this PR in the @eslint-community fork https://github.com/eslint-community/eslint-plugin-eslint-comments

For more info about why we created this organization, you can read https://eslint.org/blog/2023/03/announcing-eslint-community-org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants