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
feat(eslint-plugin): added new rule typedef #581
feat(eslint-plugin): added new rule typedef #581
Conversation
Adds the equivalent of TSLint's `typedef` rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions for you.
Had a quick eyeball of the rule code and it looks okay. I'll have a deeper look after these questions
I really love the TSLint typedef rule and I cant migrate to eslint without the support of this rule. This said, I have one proposal what can improve typedef. Let us decide which option throws a warning and which throws an error -> so with this CI/CD can fail only on some of the options. |
@Shinigami92 - this is not possible - eslint only allows for a single error level for a rule. Either it's all a warning, or it's all an error. |
Ok :/ sad but ok |
TSLint currently introduces a new option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as mentioned, remove arrowCallSignature
and callSignature
from the rule.
document that users should instead use explicit-function-return-type
.
Correct me if I'm wrong here - but looking at the options, I don't think that it needs to access parserServices at all - it's just checking for missing AST nodes. So if I'm not wrong, please remove the dependency on the parser services.
Codecov Report
@@ Coverage Diff @@
## master #581 +/- ##
==========================================
+ Coverage 94.45% 94.47% +0.01%
==========================================
Files 111 112 +1
Lines 4690 4720 +30
Branches 1291 1306 +15
==========================================
+ Hits 4430 4459 +29
Misses 150 150
- Partials 110 111 +1
|
Adds the equivalent of TSLint's
typedef
rule.Closes #558.