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: Removing curly quotes in no-eq-null report message #9852

Merged
merged 1 commit into from Jan 20, 2018

Conversation

@platinumazure
Copy link
Member

platinumazure commented Jan 17, 2018

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

Tell us about your environment

  • ESLint Version: master
  • Node Version: doesn't matter
  • npm Version: doesn't matter

What parser (default, Babel-ESLint, etc.) are you using?

Default, but doesn't matter

Please show your full configuration:

{
    "rules": {
        "no-eq-null": "error"
    }
}

What did you do? Please include the actual source code causing the issue.

if (foo == null) {
}

What did you expect to happen?

Error message: Use == when comparing to null.

What actually happened? Please include the actual, raw output from ESLint.

Got an error message, but it uses a multibyte character that does not render well in some contexts and furthermore is inconsistent with the rest of the core rules.

What changes did you make? (Give an overview)

Changed the lint message for no-eq-null to avoid using multibyte characters (curly quotes).

Is there anything you'd like reviewers to focus on?

Does this feel consistent with messages in other core rules?

Copy link
Member

not-an-aardvark left a comment

LGTM. I think we also use ` in some places, but I'm not sure how much we use it compared to '.

@platinumazure

This comment has been minimized.

Copy link
Member Author

platinumazure commented Jan 17, 2018

@j-f1

This comment has been minimized.

Copy link
Contributor

j-f1 commented Jan 17, 2018

Once we use messageIds, we’ll be able to make a new rule (maybe in eslint-plugin-eslint-plugin?) to require all messages to match a pattern (maybe only printable ASCII + space in messages?).

@platinumazure platinumazure merged commit 13bcf3c into master Jan 20, 2018
5 checks passed
5 checks passed
commit-message Commit message follows guidelines
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details
@not-an-aardvark not-an-aardvark deleted the no-curly-quotes-in-no-eq-null branch Jan 20, 2018
@renovate renovate bot mentioned this pull request Feb 14, 2018
@eslint eslint bot locked and limited conversation to collaborators Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.