Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

no-inferrable-types: Add ignore-params flag #1190

Merged
merged 1 commit into from
May 2, 2016

Conversation

abierbaum
Copy link
Contributor

This change allows using no-inferrable types at times when you
may want to still require types for method/function parameter lists
(for example when using the typedef rule)

It helps to workaround the issues in #711

@@ -27,13 +27,23 @@ export class Rule extends Lint.Rules.AbstractRule {
}

class NoInferrableTypesWalker extends Lint.RuleWalker {
public ignoreParameters: boolean = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define a const OPTION_IGNORE_PARAMS = "ignore-params"; above the class Rule declaration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@jkillian
Copy link
Contributor

jkillian commented May 2, 2016

Looks good! Can you just make the change noted above to how you handle the option provided? This will make it more consistent with other rules

This change allows using no-inferrable types at times when you
may want to still require types for method/function parameter lists
(for example when using the typedef rule)
@abierbaum abierbaum force-pushed the inferrable-types/ignore-params branch from eaedf6a to e3e6424 Compare May 2, 2016 17:37
@abierbaum
Copy link
Contributor Author

@jkillian I made the changes suggested and pushed up a new commit with everything fixed up. Let me know if there is anything more to change.

@jkillian jkillian merged commit e41bddd into palantir:master May 2, 2016
@jkillian
Copy link
Contributor

jkillian commented May 2, 2016

All good, thanks @abierbaum!

tomduncalf pushed a commit to tomduncalf/tslint that referenced this pull request Jun 14, 2016
This change allows using no-inferrable types at times when you
may want to still require types for method/function parameter lists
(for example when using the typedef rule)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants