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

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 not-an-aardvark left a comment

Choose a reason for hiding this comment

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

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

@platinumazure
Copy link
Member Author

platinumazure commented Jan 17, 2018 via email

@j-f1
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?).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants