hmil / tslint-override

TSLint plugin bringing support for the override keyword
MIT License
27 stars 6 forks source link

Allow opting out of checking for interfaces #5

Closed hmil closed 6 years ago

hmil commented 6 years ago

This has been discussed in https://github.com/Microsoft/TypeScript/issues/2000 , but I will only implement it upon request or if a PR is initiated.

stasberkov commented 6 years ago

I was going to submit alike issue but saw it already exist. Not sure my team will like marking every member of interface as "override". Opting out interfaces will be really great.

hmil commented 6 years ago

I think this can be implemented by adding the following line here or something similar.

if (clause.token === ts.SyntaxKind.ImplementsKeyword) continue;

Of course this feature needs a config flag (exclude-implements or exclude-interfaces sounds right) and some tests in test/test.ts and test/spec.ts.lint.

Feel free to submit a PR.

stasberkov commented 6 years ago

will do) Thank you!

hmil commented 6 years ago

Available since v0.3.0 behind the exclude-interfaces option thanks to @stasberkov 👍