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

Add no-multiple-var rule #1191

Merged
merged 2 commits into from
May 2, 2016
Merged

Conversation

YuichiNukiyama
Copy link
Contributor

related issue #525.

  • for another linter compatibility, I define target options (var,
    let and const)
  • I check for statement, but don't check for...in statement and
    for...of statement. becase, TS disallow multiple variable definitions
    in the same statement by default

related issue .

- for another linter compatibility, I define target options (`var`,
`let` and `const`)
- I check `for statement`, but don't check 'for...in statement' and
`for...of statement`. becase, TS disallow multiple variable definitions
in the same statement by default
@jkillian
Copy link
Contributor

jkillian commented May 1, 2016

Thanks for the PR @YuichiNukiyama!

for another linter compatibility, I define target options (var, let and const)

I'm not sure I understand why we need these options. I think this rule could maybe be simplified and not have any options? What do you think?

@YuichiNukiyama
Copy link
Contributor Author

@jkillian If you prefer simplicity to compatibility, I remove options (use only true option) and validate all of them (var, let and const) together.

@jkillian
Copy link
Contributor

jkillian commented May 2, 2016

@YuichiNukiyama No options seems best to me in this case. In what scenarios do you think people might want the different options?

@YuichiNukiyama
Copy link
Contributor Author

YuichiNukiyama commented May 2, 2016

@jkillian Speaking honestly, I don't want these options. So, I follow your idea.

@jkillian
Copy link
Contributor

jkillian commented May 2, 2016

Looks a lot better, thanks @YuichiNukiyama! One more idea, we might want an "ignore-for-loop" option to make the rule not check for loop declarations. What do you think? Sorry I didn't mention this before!

Edit: Actually, let's do this in a follow-up PR if necessary

@jkillian jkillian merged commit 779ba0b into palantir:master May 2, 2016
@YuichiNukiyama YuichiNukiyama deleted the noMultipleVar branch May 2, 2016 22:27
@YuichiNukiyama
Copy link
Contributor Author

@jkillian ignore-for-loop option is good idea. I' ll send new issue and PR.

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.

2 participants