tslint-eslint-rules icon indicating copy to clipboard operation
tslint-eslint-rules copied to clipboard

Deprecate unnecessary rules

Open ChrisMBarr opened this issue 7 years ago • 6 comments

Based on discussion in #164, there seem to be several rules in this project that duplicate existing functionality.

ChrisMBarr avatar Mar 17 '17 15:03 ChrisMBarr

for the use-is-nan rule I changed the docs since tslint won't let us use the one provided here and I did not want to delete the rule just yet. It didn't make sense to let users believe that they were using the rule from this project.

valid-typeof is probably also safe to deprecate.

I would keep no-extra-semi since the implementation is more simple that the one provided by tslint.

https://github.com/buzinas/tslint-eslint-rules/blob/master/src/rules/noExtraSemiRule.ts

https://github.com/palantir/tslint/blob/master/src/rules/semicolonRule.ts

Also, in some cases I think we should consider keeping a rule if it has a different implementation. We should try to see which one is more efficient and document the pros and cons of using the version provided here. Anyway, let's keep this issue open and see if we find other rules that we might consider deprecating for the next major version.

jmlopez-rod avatar Mar 18 '17 03:03 jmlopez-rod

So, TSlint 5 has been released, and this project has released version 4. Both major version number updates and the use-isnan rule is still being distributed, yet it's still not usable since the rule in base tslint will always override this. Is there a reason to keep distributing duplicate code that can never be consumed?

ChrisMBarr avatar Apr 06 '17 13:04 ChrisMBarr

Also no-sparse-arrays is natively supported by TSlint 5.

WiseBird avatar Apr 09 '17 07:04 WiseBird

Also, no-irregular-whitespace is introduced and natively supported by TSLint 5.2.0

roman-petrov avatar May 04 '17 11:05 roman-petrov

no-duplicate-switch-case rule is supported in tslint 5.8.0.

ikokostya avatar Nov 05 '17 16:11 ikokostya

Also, in some cases I think we should consider keeping a rule if it has a different implementation. We should try to see which one is more efficient and document the pros and cons of using the version provided here. This would be so awesome. It is really difficult to be able to distinguish which one to use/keep from looking at the code. Maybe the tests could be a good source for comparison...

We created a configuration, that uses both https://github.com/Microsoft/tslint-microsoft-contrib and tslint-eslint-rules and there are the following "name clashes" (in our case tslint-eslint-rules win because they are extended first):

  • no-constant-condition
  • no-control-regex
  • no-duplicate-case
  • no-invalid-regexp
  • no-regex-spaces

it would be nice to be able to reason about which one to use.

karfau avatar Mar 17 '18 19:03 karfau