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

Add an internal ESLint rule prefer-negative-boolean-attribute #1725

Merged

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Feb 9, 2022

Use positive [...=true] may cause problems, when ecmaVersion is not correct. #1146, fisker/eslint-plugin-prettier-doc@f1b1c6f

Maybe I can try to make a proposal in eslint-plugin-eslint-plugin later.

@fisker fisker changed the title Add a internal ESLint rule prefer-negative-boolean-attribute Add an internal ESLint rule prefer-negative-boolean-attribute Feb 9, 2022
This reverts commit 5d12d63.
This reverts commit 3678b6e.
@fisker fisker marked this pull request as ready for review February 9, 2022 12:01
@@ -74,6 +74,7 @@
"eslint": "^8.6.0",
"eslint-ava-rule-tester": "^4.0.0",
"eslint-plugin-eslint-plugin": "^4.1.0",
"eslint-plugin-internal-rules": "file:./scripts/internal-rules/",
Copy link
Contributor

Choose a reason for hiding this comment

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

Does eslint not offer a way to load a plugin from a file instead of a module?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This being a loooong story, and the reason is ridiculous, add a plugin path in config, ESLint can't get a plugin name to use...

eslint/eslint#3458

Unless you use the ESLint API, you can't add plugin in other way.

Copy link
Contributor

Choose a reason for hiding this comment

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

You could hack the module resolution like node core does but i guess it's even worse of a hack 😉.

@sindresorhus sindresorhus merged commit 9de8a44 into sindresorhus:main Feb 11, 2022
@fisker fisker deleted the prefer-negative-boolean-attribute branch February 11, 2022 14:08
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

3 participants