Skip to content

Commit

Permalink
In tslint.json, set "no-use-before-declare" to false to prevent linti…
Browse files Browse the repository at this point in the history
…ng error: (#195)

```
$ ng lint
Linting "angular-archwizard"...

ERROR: C:/NVIDIA/angular/angular-archwizard/src/lib/directives/wizard-step.directive.spec.ts[27, 31]: variable 'WizardStepTestComponent' used before declaration

Lint errors found in the listed files.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

The use of no-use-before-declare rule is now officially discouraged:
- https://palantir.github.io/tslint/rules/no-use-before-declare/
- https://stackoverflow.com/questions/54000528/angular2-tslint-show-variable-xxx-used-before-declaration-when-using-forwardr
  • Loading branch information
earshinov authored and madoar committed Mar 17, 2019
1 parent db439a9 commit 5b54481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-use-before-declare": false,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
Expand Down

0 comments on commit 5b54481

Please sign in to comment.