Skip to content
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

standard-strict #382

Closed
rstacruz opened this issue Jan 12, 2016 · 19 comments

Comments

@rstacruz
Copy link
Member

commented Jan 12, 2016

What are your thoughts on making eslint-config-standard-strict?

This would be extra rules on top of eslint-config-standard that would add more checks, like:

  • no-div-regex (to catch return /=foo/)
  • no-invalid-this (to catch () => this)
  • no-unused-expressions
  • camelcase
  • and so on...

At first, it can be not integrated into standard at all, but eventually can be added as standard --strict and standard.lintFiles({ strict: true }). This will also set the precedent that we can have --no-react or similar flags.

@dcousens

This comment has been minimized.

Copy link
Member

commented Jan 12, 2016

no-invalid-this (to catch () => this)

What is wrong with that?

@rstacruz

This comment has been minimized.

Copy link
Member Author

commented Jan 12, 2016

Because that will raise an error in strict mode.

@pbrinkmeier

This comment has been minimized.

Copy link

commented Jan 12, 2016

I like the idea, but I would keep standard optionless and create this as standard-strict, as a seperate package.

@yoshuawuyts

This comment has been minimized.

Copy link
Contributor

commented Jan 12, 2016

yeah, we should avoid having options. @rstacruz have you raised those rules to be considered in individual issues? I'm not familiar with all of them, but perhaps they'd be a good addition.

@rstacruz

This comment has been minimized.

Copy link
Member Author

commented Jan 13, 2016

aye, a separate package makes sense. they were /sorta/ discussed in #216, with an exhaustive list of differences from xo here: #216 (comment)

nonetheless, i think it makes sense to do it in a separate package at first (think of it as "standard-staging"), and we can eventually migrate rules into upstream standard. It really is no big deal to build it as a separate package, it's basically:

/* eslintrc */
{
  "extends": [ "standard", "standard-react", "standard-strict" ]
}
@denis-sokolov

This comment has been minimized.

Copy link

commented Jan 27, 2016

Awkward...

@rstacruz

This comment has been minimized.

Copy link
Member Author

commented Jan 27, 2016

nice one denis!

@rstacruz

This comment has been minimized.

Copy link
Member Author

commented Jan 27, 2016

@feross

This comment has been minimized.

Copy link
Member

commented Feb 4, 2016

Not completely against this idea. Need to think about it more.

@feross

This comment has been minimized.

Copy link
Member

commented Feb 4, 2016

Here's another rule that would make sense for a stricter mode: #381

@feross

This comment has been minimized.

Copy link
Member

commented Feb 5, 2016

@dcousens

This comment has been minimized.

Copy link
Member

commented Feb 5, 2016

Perhaps standard-strict could be allowed to break more often.

Make it the bleeding-edge of what can be expected in the next major version of standard?

@dcousens

This comment has been minimized.

Copy link
Member

commented Feb 5, 2016

Maybe standard-next? :P

@feross

This comment has been minimized.

Copy link
Member

commented Feb 5, 2016

@rstacruz

This comment has been minimized.

Copy link
Member Author

commented Feb 5, 2016

@cesarandreu

This comment has been minimized.

Copy link
Contributor

commented Feb 6, 2016

@dcousens @feross Are you familiar with codemods? There's a Facebook library jscodeshift that lets you apply AST transformations to JS code, instead of doing text transformations.

It may be worth considering writing a few transforms for breaking changes. Even if they don't catch all the cases, it makes it much easier for people to upgrade their projects.

@feross

This comment has been minimized.

Copy link
Member

commented Feb 7, 2016

@cesarandreu Neat. This could come in handy for standard-format.

@dcousens

This comment has been minimized.

Copy link
Member

commented Sep 27, 2016

I'd say this has lost steam. Close?

@feross

This comment has been minimized.

Copy link
Member

commented Sep 27, 2016

We've basically been making standard slightly stricter with each release, but not too fast that users get upset or find it disruptive.

Now that we have --fix and it works really well, I'm more certain that that this is the right strategy to continue taking in standard.

@feross feross closed this Sep 27, 2016

@feross feross removed the enhancement label May 10, 2018

@feross feross added the enhancement label May 10, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
7 participants
You can’t perform that action at this time.