-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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(parser): Draft of scope analysis with types #233
Conversation
This comment has been minimized.
This comment has been minimized.
looks like its working, we have to change logic in
even if you specify globals for browser and es6 it will report that @typescript-eslint/core-team @mysticatea i will appreciate some feedback (and maybe some suggestions for tests) |
Amazing! Hm. I have thought that we should use two
Varaible references must not resolve to types and type references must not resolve to variables. Some entities such as classes and enums belong to both the variable scope and the type scope. (so Therefore, my thought is a If a single Though, we need About variable rules in the plugin, I believe that we should deprecate those to avoid doing duplication. But If we decide to maintain those, I think that we should implement those with |
hmm, this is good idea to split it, but i think it should be one ScopeManager with separated refferences and variables that we can share only some declarations between between types and variables i will change this that scope has 2 types of references and core rules are going to work only for variables i'm going to have to fix only no-unused-vars to check for types and other rules will have to be re-implemented for types. no-unused-variables and other rules/checks witch can be done by tsc, can be migrated but only after we solve performance issue with creating programs... even if we decide to leverage tsc as replacement for some of rules we still need scope for types to implement rules not supported by it. no-shadow is good example, typescript is not warning user about this and this is great rule to catch some potential issues
with this new implementation (splitting references) we should consider making thanks @mysticatea for this idea 👍 |
Please can we reopen this using the new WIP PR feature on GitHub? |
* Update eslint-docs * Upgrade eslint-docs (take 2)
This is early stage of updated scope-analysis with types included into scope, there is still a lot to do.
Goal of this PR is to solve #18, #19, #21, #60, #207 #122, #249
type
andvar
type
,interface