Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fix(eslint-plugin): [no-unused-vars] correct detection of unused vars…
… in a declared module with `export =` (#2505) If a `declare module` has an `export =` in its body, then TS will only export that. If it doesn't have an `export =`, then all things are ambiently exported. This adds handling to correctly detect this case.
- Loading branch information
Showing
with
105 additions
and 16 deletions.
- +4 −1 packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts
- +1 −1 packages/eslint-plugin/src/rules/indent.ts
- +34 −3 packages/eslint-plugin/src/rules/no-unused-vars.ts
- +32 −0 packages/eslint-plugin/tests/rules/no-unused-vars.test.ts
- +0 −1 packages/eslint-plugin/typings/eslint-rules.d.ts
- +18 −8 packages/scope-manager/src/scope/ScopeBase.ts
- +16 −2 packages/types/src/ts-estree.ts