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
Additions to eslint:recommended #477
Comments
|
There are some considerations to be made here regarding the implementation. One possibility would be to simply require the user to use Any thoughts on this? |
I'm not sure if it's a good idea to be disabling rules that don't have their own implementation in this plugin, if only because we know a large number of users have mixed codebases. Would probably be good as a separate config for these things to make it easy for people to opt into it. I'm unsure how much weight we should be putting behind mixed codebases with the recommended config. |
There are some rules in
eslint:recommended
of which the configuration could be overridden here. I think there are two main categories here:no-undef
: Typescript already checks this, so this rule can be disabled.no-var
: Typescript always allowslet
andconst
which have considerable benefits, so they can be recommended by default.prefer-const
: If possible,const
is more restrictive and thus easier to reason about.prefer-rest-params
: Since the spread operator is available in Typescript, recommend its usage instead.no-prototype-builtins
: This is perhaps more personal taste than the others as it doesn't fall in either category, but whereas Typescript normally creates type-safe code, Object.create(null).hasOwnProtoperty(x) can still cause TypeErrors. This can be circumvented by recommendingObject.prototype.hasOwnProperty.call
instead.The text was updated successfully, but these errors were encountered: