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

fix: incorrectly-used violation message placeholders #236

Merged
merged 1 commit into from Jul 9, 2022

Conversation

bmish
Copy link
Collaborator

@bmish bmish commented Jul 5, 2022

Fixing some lint violations detected by my WIP PR to update eslint-plugin/no-missing-placeholders and eslint-plugin/no-unused-placeholders to handle placeholders in messageIds:

lib/rules/no-hooks-from-ancestor-modules.js
  31:43  error  The placeholder {{hookName}} does not exist      eslint-plugin/no-missing-placeholders
  31:43  error  The placeholder {{invokedMethodName}} is unused  eslint-plugin/no-unused-placeholders

lib/rules/no-only.js
  27:26  error  The placeholder {{callee}} is unused  eslint-plugin/no-unused-placeholders

lib/rules/no-skip.js
  28:26  error  The placeholder {{callee}} is unused  eslint-plugin/no-unused-placeholders

@coveralls
Copy link

coveralls commented Jul 5, 2022

Coverage Status

Coverage remained the same at 100.0% when pulling 546345f on bmish:fix-message-ids into a785e87 on platinumazure:master.

@@ -28,7 +28,7 @@ module.exports = {
},
fixable: null,
messages: {
"noHooksFromAncestorModules": "Do not call {{usedHooksIdentifierName}}.{{hookName}} from an ancestor module."
"noHooksFromAncestorModules": "Do not call {{usedHooksIdentifierName}}.{{invokedMethodName}} from an ancestor 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.

@raycohen the result of this mistake was it was always printing:

  17:5  error  Do not call hooks.{{hookName}} from an ancestor module  qunit/no-hooks-from-ancestor-modules

@platinumazure
Copy link
Owner

platinumazure commented Jul 9, 2022

@bmish Thanks for this! Any reason not to merge this PR? (It's still in Draft state.)

@bmish bmish marked this pull request as ready for review July 9, 2022 02:19
@bmish
Copy link
Collaborator Author

bmish commented Jul 9, 2022

Ready to merge.

@platinumazure platinumazure merged commit 89922c8 into platinumazure:master Jul 9, 2022
@platinumazure
Copy link
Owner

Thanks again!

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