Skip to content

Add eslint-plugin-eslint-comments #24690

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

Merged
merged 1 commit into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ plugins:
- eslint-plugin-custom-elements
- eslint-plugin-regexp
- eslint-plugin-wc
- eslint-plugin-eslint-comments

env:
es2022: true
Expand Down Expand Up @@ -86,6 +87,15 @@ rules:
dot-notation: [0]
eol-last: [2]
eqeqeq: [2]
eslint-comments/disable-enable-pair: [2]
eslint-comments/no-aggregating-enable: [2]
eslint-comments/no-duplicate-disable: [2]
eslint-comments/no-restricted-disable: [0]
eslint-comments/no-unlimited-disable: [2]
eslint-comments/no-unused-disable: [2]
eslint-comments/no-unused-enable: [2]
eslint-comments/no-use: [0]
eslint-comments/require-description: [0]
Copy link
Member

Choose a reason for hiding this comment

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

I'm actually all for enabling this rule.
If PR authors need to disable eslint, they should justify why.
But I understand that it needs quite a bit of work to enable, so can be postponed for now.

Copy link
Member Author

@silverwind silverwind May 12, 2023

Choose a reason for hiding this comment

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

We have this which will require specific rule name to disable, which I think is sufficient.

Comment syntax inside a eslint disable comment is also pretty weird and I didn't know about it until very recently, so it may confuse people on how to even put the requested comment.

/* global $ -- This script using jQuery. */

for-direction: [2]
func-call-spacing: [2, never]
func-name-matching: [2]
Expand Down
29 changes: 29 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"@vitejs/plugin-vue": "4.2.3",
"eslint": "8.40.0",
"eslint-plugin-custom-elements": "0.0.8",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jquery": "1.5.1",
"eslint-plugin-no-jquery": "2.7.0",
Expand Down