Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upRelease proposal: standard v8 #564
Comments
This comment has been minimized.
This comment has been minimized.
|
I'm happy to announce the immediate availability of a You try it out today by installing it: Cheers! |
This comment has been minimized.
This comment has been minimized.
|
Hey collaborators! I have a favor to ask: Can you test out the
Feedback would be great! @maxogden @mafintosh @othiym23 @dcposch @Flet @dcousens @jprichardson @xjamundx @watson @rstacruz @reggi @yoshuawuyts @bcomnes @jb55 |
This comment has been minimized.
This comment has been minimized.
|
Tested it on 4 or so (ES6 heavy) repos, all seems good |
This comment has been minimized.
This comment has been minimized.
|
Thanks @yoshuawuyts! |
This comment has been minimized.
This comment has been minimized.
|
standard |
This comment has been minimized.
This comment has been minimized.
|
Just tried it on a very large project I'm working on, got this error:
My config in "standard": {
"ignore": [
"static/"
],
"parser": "babel-eslint",
}If I remove |
This comment has been minimized.
This comment has been minimized.
|
@jprichardson Thanks for testing. This is an issue with the interaction between I think we'll just have to disable the |
feross
added a commit
to standard/eslint-config-standard
that referenced
this issue
Jul 23, 2016
This comment has been minimized.
This comment has been minimized.
|
standard @jprichardson Can you test it out now? |
This comment has been minimized.
This comment has been minimized.
|
Wow. Nice work @feross! |
This comment has been minimized.
This comment has been minimized.
|
@jprichardson Good to hear. Thanks for helping to test it out! |
This comment has been minimized.
This comment has been minimized.
|
Thanks for kicking this off! Any opposition to bumping to eslint-plugin-react@5.2.2? There have been quite a few fixes and additions since 5.0.1: Seems like a good time to update? |
This comment has been minimized.
This comment has been minimized.
|
Released |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Just merged one new rule: Require block comments to be balanced (#572) Released standard |
This comment has been minimized.
This comment has been minimized.
|
@feross |
This comment has been minimized.
This comment has been minimized.
|
@timoxley |
This comment has been minimized.
This comment has been minimized.
@feross I do understand & accept the sentiment in standard/eslint-config-standard#27, though it probably wouldn't be my preference.
|
This comment has been minimized.
This comment has been minimized.
|
@feross I think you could head-off many complaints if standard promoted the use of Created an issue for this: #576 Update: Message promoting |
This comment has been minimized.
This comment has been minimized.
kyeotic
commented
Jul 26, 2016
•
|
I agree with @timoxley that Maybe it could go into the error output? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I fully agree with #564 (comment), in that I'm not sure the benefits out weigh the extra rule. |
This comment has been minimized.
This comment has been minimized.
|
So the JSX double quoting rule requires mixing of double/single quotes when doing any kind of inline JS in JSX: <div
doubleQuotes="just because this is static"
butForDynamicValues={singleQuotes === 'are' ? 'needed' : 'now'}
/>Or a more realistic example: <div title="Help Text" className={selected === item.id ? 'selected' : 'unselected'}>
{item.content}
</div>This converted me to a mild One rule > Two rules |
This comment has been minimized.
This comment has been minimized.
|
@feross Another option could be for For reference, this is the current error when running the latest standard beta (
|
This comment has been minimized.
This comment has been minimized.
|
Standard 8 is gonna land soon. We gotta figure out the JSX double quotes situation... Given that all production versions of Standard before this don't allow JSX double quotes AND we don't have consensus, it should be removed from the Standard v8 release. Not too mention though other reasons like 1) Facebook themselves are inconsistent 2) it's confusing for new users (different rules (when/where) 3) JSX is not HTML. 4) |
This comment has been minimized.
This comment has been minimized.
kyeotic
commented
Aug 16, 2016
•
You might disagree with the decision, but saying we have to "figure it out" ignores the multiple threads over which this has already been discussed. The fact that its in the release is it being "figured out". |
This comment has been minimized.
This comment has been minimized.
|
@tyrsius I think what @jprichardson is saying, is perhaps the final decision should be delayed rather than delaying |
This comment has been minimized.
This comment has been minimized.
pluma
commented
Aug 17, 2016
•
|
@jprichardson the logical conclusion if there is no consensus isn't to enforce your taste but to remove the validation until there is a consensus. JSX is neither HTML nor JS so I'm not even sure it belongs in standard at all. In fact, your entire "JSX isn't HTML" argument is already violated by the enforcement of boolean properties being passed with the shorthand syntax (i.e. That said, there was a consensus. Just one you happen to disagree with. |
This comment has been minimized.
This comment has been minimized.
There's also some consensus that the current consensus is disagreeable. |
This comment has been minimized.
This comment has been minimized.
pluma
commented
Aug 17, 2016
|
@timoxley which indicates this really shouldn't be part of standard to begin with. |
This comment has been minimized.
This comment has been minimized.
joshmanders
commented
Aug 17, 2016
|
Agreed with @pluma. It should just be removed. I really enjoy using standard but I can't stand single quotes in my html, OCD about it, and whether you see it as html or not, JSX to me is html-like, so that OCD triggers there. I'd hate to have to deviate away from the ease of just using standard all because of this. |
This comment has been minimized.
This comment has been minimized.
|
I don't think it should be removed. Standard is all about just picking one way and sticking with it. I don't see any great advantage with either one, but having it not enforce any of them would be worse. My vote goes to @feross just picking one of them. It's not like it going to affect anyones day to day life. Both ways are easy to fix with the new |
This comment has been minimized.
This comment has been minimized.
Good idea. Let's skip running PR here: #590 |
This comment has been minimized.
This comment has been minimized.
Yeah, tell me about it. Either decision we make, there are going to be some folks who aren't happy. That's just the way a curated style guide like this works. There's no clear winner, IMO. Quoting some of the arguments from this thread, here's how I would sum this up: Pros for JSX double quotes:
Pros for JSX single quotes:
The But in attempting to switch some of my own code to the new v8 style, I'm running into situations where the intermixing of single and double quotes feels like it's actually reducing clarity. This is a typical example: <img className="poster" alt={this.getAltText('poster')} />In this situation, the rule is not reducing the likelihood of errors or increasing the clarity of the code. There's added cognitive overhead to remember when to use each type of quote. I worry that beginners won't be able to figure out when to use each type of quote, because we've taken a simple rule ("always use single quotes") and made it more complex ("use single quotes for JS, use double quotes for JSX"). There's no perfect decision here. But I think we should revert to standard v7 behavior ("always use single quotes") since that's the simpler choice. Note that allowing any type of quote isn't acceptable. Whenever there's two ways to do something without a clear winner, |
feross
modified the milestone:
standard v8
Aug 19, 2016
feross
added a commit
to standard/eslint-config-standard-jsx
that referenced
this issue
Aug 19, 2016
This comment has been minimized.
This comment has been minimized.
|
Just published standard
And, changed rule:
I promoted this release to the "latest" npm dist-tag so it gets installed with If there are no issues, this release will become the official standard v8.0.0 release on September 1, 2016. |
This comment has been minimized.
This comment has been minimized.
|
I just realized that my trip to China on August 26 might interfere with the planned September 1 release date. So, new release date: August 23 (one week early). That way I have a couple days to fix any issues that might come up. Also, there are plenty of contributors who have github/npm permission who can step up if some urgent issue surfaces while I'm gone. |
feross
added a commit
that referenced
this issue
Aug 24, 2016
feross
closed this
in
#603
Aug 24, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Jessidhia
commented
Aug 24, 2016
|
@feross you probably should make a non-beta release of |
This comment has been minimized.
This comment has been minimized.
|
@Kovensky good call, done |
This comment has been minimized.
This comment has been minimized.
robinpokorny
commented
Aug 25, 2016
|
@feross Should |
This comment has been minimized.
This comment has been minimized.
|
@robinpokorny Done |
gemmaleigh
added a commit
to alphagov/govuk_elements
that referenced
this issue
Oct 11, 2016
This comment has been minimized.
This comment has been minimized.
yantakus
commented
Oct 26, 2016
|
@feross You forgot to mention one Pros for JSX double quotes and it is the most important of all: JSX is treated as HTML in most editors, so they use double quotes by default. I mean when you start typing an attribute and then choose from autocomplete options. Editors insert double quotes in this case. And this behavior is even not configurable for some editors, eg. Intellij Idea. It is possible to disable auto-insertion of quotes at all, but not auto-insert single quotes: http://stackoverflow.com/questions/37635871/how-can-i-disable-syntax-autocomplete-of-jsx-properties. At this moment this is the only rule in Standard that forces me to overwrite rules. Kinda frustrating... |

feross commentedJul 12, 2016
•
edited
Planned release date: September 1, 2016. (approx. 45 days from the date of this issue)
New features
--fixcommand line flag (#540) (standard/standard-engine#107)New rules
(Estimated % of affected standard users, based on test suite in parens)
Changed rules
Enforce use of double quotes in JSX attributes (jsx-quotes) (1%, but likely more in private repos)BREAKING: This rule was changed to reflect the way the vast majority of developers quote HTML attributes (both in plain HTML and in the React community) (standard/eslint-config-standard#27)babelusers who use async generator functions.Internal changes