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

handle forward referenced in prefer-const rule #1908

Merged
merged 3 commits into from
Dec 23, 2016

Conversation

vladima
Copy link
Contributor

@vladima vladima commented Dec 19, 2016

fixes error related to usage of forward references in prefer-const rule

PR checklist

What changes did you make?

After this change list of variable declarations in block scope is collected immediately after entering the scope. This prevents cases when variable is syntactically located after its usage

@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @vladima! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@nchen63
Copy link
Contributor

nchen63 commented Dec 22, 2016

@vladima can you turn on circle ci?

@nchen63
Copy link
Contributor

nchen63 commented Dec 22, 2016

Doesn't seem to catch:

module MyModule {
    let moduleMember = 4;
}

@vladima
Copy link
Contributor Author

vladima commented Dec 22, 2016

@nchen63 yes, if you can tell me how to do it

@nchen63
Copy link
Contributor

nchen63 commented Dec 22, 2016

go to https://circleci.com/add-projects and add your fork

@vladima
Copy link
Contributor Author

vladima commented Dec 22, 2016

done

@nchen63
Copy link
Contributor

nchen63 commented Dec 22, 2016

another case that isn't caught - inside a switch statement

@nchen63
Copy link
Contributor

nchen63 commented Dec 22, 2016

that's weird, CircleCI isn't running still. Can you fix the linting errors when you run npm run verify?

Copy link
Contributor

@nchen63 nchen63 left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

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