Comments (2)
Digging into this, I don't know what we can do about this without significant work.
Right now our rule sits on top of the base rule, so I think we would have to clone the base rule's code in order to handle this case properly.
This would be a good candidate for using the TS parser services if it reports unused vars.
This should be caught by something like no-redeclare
. Though it won't because we haven't added ts-specific handling to that rule.
from typescript-eslint.
@bradzacher right now there is no real solution for that. It's require some work on parser before we can start.
I started doing PR with support for additional data in scope for typescript "types" but its not near finish.
When it will be done, we can start thinking about solving this.
I made this issue for now just to inform ppl that we are aware about it and we will work on it.
no-redeclare
is not possible now without scope analysis (unless we do it in bad way on our side)
type references and annotations are not in eslint scope for now.
from typescript-eslint.
Related Issues (20)
- Enhancement: [no-confusing-non-null-assertion] should check !instanceof HOT 1
- Bug: parser breaks on folders that has been excluded HOT 2
- Bug: Parsing error: ESLint was configured to run on <file> using `parserOptions.project` HOT 1
- Docs: Unusually large padding after table cell lines in Contributor_Tiers.mdx
- Bug: @typescript-eslint/no-unnecessary-condition false positives for getters HOT 8
- Bug: [@typescript-eslint/no-invalid-void-type] false positive when used in a return type where there is a union HOT 1
- Bug: [explicit-function-return-type] false negatives on inner function when using allowTypedFunctionExpressions option
- Bug: [dot-notation] False positive with optional chaining and allowPrivateClassPropertyAccess: true
- Docs: Prioritize formatting rules over other, less-important ones in docs HOT 8
- Bug: [no-unnecessary-type-assertion] (regression) false positives on template literals with no expressions
- Error: Plugin "@typescript-eslint" was conflicted HOT 1
- Docs: Mention stylistic(TypeChecked) at end of 'getting started' docs? HOT 2
- Bug: [consistent-type-assertions] broken autofix for arrow functions
- Configs: Enable no-undef by default HOT 6
- Bug: [no-unnecessary-type-assertion] assumes better type narrowing than typescript offers HOT 2
- Bug(website): Rules table filters neglect some rules
- Bug: `tsconfig.json` not respected in new files when multiple tsconfigs include the same directory with `useProjectService` enabled HOT 1
- Bug: incompatible type `ParserOptions['projectFolderIgnoreList']`
- Bug: ESLint raises type-safety warnings for imported functions and types from shared libraries HOT 4
- Docs: remove import from config file in getting started HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-eslint.