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
Fix: Corrected notice for invalid (:) plugin names #13473
Conversation
2ec47a2
to
35a3bd2
Compare
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.
@JoshuaKGoldberg thanks for the PR, and sorry for the delay!
messages/plugin-invalid.txt
Outdated
"<%= configName %>" is invalid syntax for a config specifier. | ||
|
||
* If your intention is to extend from a configuration exported from the plugin, add the configuration name after a slash: e.g. "<%= configName %>/myConfig". | ||
* If this is the name of a shareable config instead of a plugin, remove the "plugin:" prefix: i.e. "<%= configName.slice("plugin:".length) %>". |
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.
TIL this is allowed in _.template
. Confirmed locally this does what we want it to:
Oops! Something went wrong! :(
ESLint: 7.7.0
"plugin:wat" is invalid syntax for a config specifier.
* If your intention is to extend from a configuration exported from the plugin, add the configuration name after a slash: e.g. "plugin:wat/myConfig".
* If this is the name of a shareable config instead of a plugin, remove the "plugin:" prefix: i.e. "wat".
'"plugin:wat"' was referenced from the config file in "C:\Code\eslinttemp\.eslintrc.json".
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
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 output looks awesome!
I can also confirm locally that this works. It seems that <%-
and <%=
can evaluate code, although it doesn't look like that in the lodash docs.
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.
Looks great! I left just a few small suggestions.
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
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.
Looks great, thanks!
Thanks for contributing! |
…23) * Update: Implement eslint/eslint#13473 (fixes #12) * Fix lint errors
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
What changes did you make? (Give an overview)
Three small, related changes:
/
in the name.plugin-
if the module name has a seemingly erroneous:
.:
names, a newplugin-missing
error message suggests that the plugin name might be invalid.This'll be the new error contents from the example in the issue:
Fixes #13255. Although the issue is marked as
working as intended
, the comments indicate the error message given for an invalid plugin name should be improved.Is there anything you'd like reviewers to focus on?
I'm not confident this is the right error message... would welcome someone with more ESLint context helping improve it please! 😄