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
Add an internal ESLint rule prefer-negative-boolean-attribute
#1725
Conversation
prefer-negative-boolean-attribute
prefer-negative-boolean-attribute
@@ -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/", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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...
Unless you use the ESLint API, you can't add plugin in other way.
"eslint-plugin-unicorn": "file:../.." - https://github.com/prettier/eslint-plugin-prettier-internal-rules/blob/2c414e5b4dec5b4dca39aec9dcf3cd0a0d603f11/index.js#L5
- https://github.com/mysticatea/eslint-plugin-node/blob/f45c6149be7235c0f7422d1179c25726afeecd83/package.json#L28
- https://www.npmjs.com/package/eslint-plugin-self-dir
There was a problem hiding this comment.
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 😉.
Use positive
[...=true]
may cause problems, whenecmaVersion
is not correct. #1146, fisker/eslint-plugin-prettier-doc@f1b1c6fMaybe I can try to make a proposal in eslint-plugin-eslint-plugin later.