Skip to content

Add quote-props rule - #17

Merged
nzakas merged 1 commit into
eslint:masterfrom
mathiasbynens:quote-props
Jul 7, 2013
Merged

nzakas merged 1 commit into
eslint:masterfrom
mathiasbynens:quote-props

Conversation

@mathiasbynens

Copy link
Copy Markdown
Contributor

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 :)

@mathiasbynens

Copy link
Copy Markdown
Contributor Author

The next step would be to specify the quote type (single or double quotes) and have ESLint check that, too.

@mathiasbynens

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback. I’ve applied the changes and force-pushed my amended commit.

nzakas added a commit that referenced this pull request Jul 7, 2013
@nzakas
nzakas merged commit 3ee21c5 into eslint:master Jul 7, 2013
@nzakas

nzakas commented Jul 7, 2013

Copy link
Copy Markdown
Member

Merged in, thanks!

Would you mind adding some documentation to the wiki? There are some examples here:
https://github.com/nzakas/eslint/wiki/Rules

I think this would fall under "stylistic issues"?

@mathiasbynens

Copy link
Copy Markdown
Contributor Author

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 docs folder in the repository rather than using a separate Wiki with its own version control history, so that the master branch and the docs are always up to date, and so that people can submit pull requests for documentation.

@nzakas

nzakas commented Jul 11, 2013

Copy link
Copy Markdown
Member

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).

@evangoer

Copy link
Copy Markdown
Contributor

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.

@nzakas

nzakas commented Jul 14, 2013

Copy link
Copy Markdown
Member

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:

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.

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/17#issuecomment-20930294
.


Nicholas C. Zakas
@SlickNet

Author, Professional JavaScript for Web Developers
Buy it at Amazon.com:
http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3

@evangoer

Copy link
Copy Markdown
Contributor

Hmmm. Is there a frosty beverage in it for me? :)

@nzakas

nzakas commented Jul 14, 2013

Copy link
Copy Markdown
Member

Absolutely. Yes.

On Sun, Jul 14, 2013 at 12:17 PM, Evan Goer notifications@github.comwrote:

Hmmm. Is there a frosty beverage in it for me? :)

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/17#issuecomment-20941842
.


Nicholas C. Zakas
@SlickNet

Author, Professional JavaScript for Web Developers
Buy it at Amazon.com:
http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3

@eslint-deprecated eslint-deprecated Bot locked and limited conversation to collaborators Feb 7, 2018
@eslint-deprecated eslint-deprecated Bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 7, 2018
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.

3 participants