Skip to content

Add a no-single-quotes rule to enforce a fancy closing single quote #5

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

matthemsteger
Copy link

This adds a rule that we find useful in our static gettext translation. From a design perspective, we want to only use the fancy single quote (closing single quote) and disallow the regular single quote that engineers usually use everywhere. It is more typographically sound. https://practicaltypography.com/straight-and-curly-quotes.html

This library is wonderful and is a great place to put this gettext style enforcement. I mostly copied the existing implementation.

  • It enforces the same parameter stuff as the other rules
  • It accepts (does not fire a violation) when parameters are not string literals, it only applies to string literals

@SBoudrias
Copy link
Contributor

I think this would be awesome if we'd also make it auto-fixable. This would be much better than simply showing an error

@matthemsteger
Copy link
Author

I can take a stab at that

@SBoudrias
Copy link
Contributor

BTW, the CI was failing because we were still referencing nsp in the repository. I've removed it from master, so if you rebase the CI will run on your PR.

@wxu-aa
Copy link
Contributor

wxu-aa commented Jun 24, 2019

@matthemsteger

Hey your PR is good, could you check the CI issue on your PR pipeline?

Thank you!

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.

3 participants