Skip to content

Remove no-use-before-declare and no-duplicate-variable from tslint.json because it is covered by no-var-keyword #5755

Closed
@Martin-Luft

Description

@Martin-Luft

Bug Report or Feature Request (mark with an x)

- [x] bug report
- [ ] feature request

Versions.

@angular/cli: 1.0.0
node: 7.8.0
os: linux x64
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1

Repro steps.

The log given by the failure.

Desired functionality.

Mention any other details that might be useful.

The rule describtion (https://palantir.github.io/tslint/rules/no-use-before-declare/) for the no-use-before-declare rule says:

This rule is primarily useful when using the var keyword - the compiler will detect if a let and const variable is used before it is declared.

The rule describtion (https://palantir.github.io/tslint/rules/no-duplicate-variable/) for the no-duplicate-variable rule says:

This rule is only useful when using the var keyword - the compiler will detect redeclarations of let and const variables.

The Angular CLI created tslint.json contains the no-use-before-declare rule, the no-duplicate-variable and the no-var-keyword rule.
When using the no-var-keyword rule the no-use-before-declare rule and no-duplicate-variable rules can be dropped.

Metadata

Metadata

Assignees

Labels

P5The team acknowledges the request but does not plan to address it, it remains open for discussioneffort1: easy (hours)severity1: confusing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions