-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Add quote-props
rule
#17
Conversation
The next step would be to specify the quote type (single or double quotes) and have ESLint check that, too. |
Closes #17.
Thanks for the feedback. I’ve applied the changes and force-pushed my amended commit. |
Merged in, thanks! Would you mind adding some documentation to the wiki? There are some examples here: I think this would fall under "stylistic issues"? |
Done: https://github.com/nzakas/eslint/wiki/Quote-props I would argue this is not just a stylistic issue — as explained in the docs, consistently quoting property names helps avoids lots of issues. But I’m fine with that categorization. Suggestion: keep the documentation in a |
I have a hard time buying that it's not a stylistic issue - but we can agree to disagree because it doesn't matter in this context. :) For docs, I understand your reasoning. My main problem with that approach is that it becomes less a navigable site and more digging into the code base to get information. I don't want people to have to go into the code repo to get information. I'm certainly open to suggestions in this regard (though perhaps a new issue would be better than overloading this one). |
I agree with Mathias, pull requests for documentation are a good thing. Keep the docs in a docs/ folder, and register yourself a shiny .io domain for hosting them. |
I'm not opposed to it, do you want to volunteer to take that effort on? :) On Sat, Jul 13, 2013 at 6:59 PM, Evan Goer notifications@github.com wrote:
Nicholas C. Zakas Author, Professional JavaScript for Web Developers |
Hmmm. Is there a frosty beverage in it for me? :) |
Absolutely. Yes. On Sun, Jul 14, 2013 at 12:17 PM, Evan Goer notifications@github.comwrote:
Nicholas C. Zakas Author, Professional JavaScript for Web Developers |
I like to ensure property names in object literals are always wrapped in quotes, since depending on the property name sometimes you need to quote them anyway.
I’ve always wanted this in JS{L,H}int. It was surprisingly easy to add this rule to ESLint :)