uber / standard

JavaScript Standard Style — One Style to Rule Them All
MIT License
70 stars 8 forks source link

Added --babel option, restrict no-extra-parens to functions only #37

Closed rtsao closed 8 years ago

rtsao commented 9 years ago

The ES6 config extends the base config, and the Babel config extends the ES6 config.

Addresses:

rtsao commented 9 years ago

@malandrew @Raynos

andrewdeandrade commented 9 years ago

I'd like to see #31 addressed in es6 mode.

I'd like to see more discussion about the merit of supporting experimental features other than, this is something I want to use. I'm not a fan of paving that cowpath. If people really want those features on a case by case basis, uber-standard supports an eslintrc file in your project.

On top of not wanting to pave a cowpath, I also think that splintering things down into a third standard is the wrong way. We now have two standards, this will put us at three. https://xkcd.com/927/

rtsao commented 9 years ago

For the purposes of this diff, ES6 inherits all the standard rules, so #31 is addressed in all modes.

Also I don't view it as different standards. Babel mode doesn't introduce any new linting rules or even change existing ones, it merely allows for parsing of files that use language features included in Babel. Furthermore, when we transition to node 4.0, ES6 mode will presumably become the new default and we will be back to two.

I just think linting and transpilation should have feature parity. If people are using Babel, they ought to still be able to use uber-standard. Is it better for people to roll their own linting configuration? I'd rather pave the Babel cowpath then have people using no standard lint config at all.

chrisirhc commented 9 years ago

I agree with the reasoning here. If we pick Babel for experimental features, the changes in this PR would standardize the choice for linting experimental features (babel-eslint) as well as where they should come from (babel).

Update: Removed comment about custom parsers. Looks like that was a cache issue, works fine.