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

strict #128

Open
SimonLab opened this issue Sep 20, 2016 · 3 comments
Open

strict #128

SimonLab opened this issue Sep 20, 2016 · 3 comments

Comments

@SimonLab
Copy link
Member

http://eslint.org/docs/rules/strict

strict: 2

I'm not sure about this rule, I think it can add more checks and good practice by using it but we also have all the other eslint which let us know if something is wrong

@eliasmalik
Copy link
Contributor

I think we should have strict mode, it does more than add checks, it turns mistakes that may fail silently into actual errors.

@nelsonic
Copy link
Member

nelsonic commented Sep 29, 2016

Many of the 'use strict'; checks are also performed by the linter...

See:

What we need to know what additional benefit we get from including a 'use strict'; in our files...?

@nelsonic nelsonic reopened this Sep 29, 2016
@eliasmalik
Copy link
Contributor

@nelsonic from a quick scan of those articles,

  • Prevents this coersion and accidentally calling constructors without new
  • Throws when trying to assign immutable properties

I agree that most of the issues covered by strict mode are also covered by the linter. But having strict mode on as well provides a level of redundancy. We know that we may change some of the linter rules in the future. It's nice to have the freedom to be able to do that without worrying about that same change introducing a vector for weird run-time bugs.

I'm happy to be persuaded to turn this off, but at the moment I think it's a good thing to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants