Closed
Description
Bug Report or Feature Request (mark with an x
)
- [X] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x
)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [X] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
macOS 10.13.6
Angular CLI: 6.1.1
Node: 8.11.3
OS: darwin x64
Angular: 6.1.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.7.1
@angular-devkit/build-angular 0.7.1
@angular-devkit/build-ng-packagr 0.7.1
@angular-devkit/build-optimizer 0.7.1
@angular-devkit/build-webpack 0.7.1
@angular-devkit/core 0.7.1
@angular-devkit/schematics 0.7.1
@angular/cli 6.1.1
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.1.1
@schematics/angular 0.7.1
@schematics/update 0.7.1
ng-packagr 4.0.1
rxjs 6.2.2
typescript 2.9.2
webpack 4.9.2
Repro steps
- Create a new Angular workspace with a project named
@company/app
- In
projects/company/app/src/apis/widgets
add at least one TS file with an error TS lint will catch - In
angular.json
add this glob to the array underprojects
.@company/app
.architect
.lint
.options
.exclude
:projects/company/app/src/apis/**"
- Run
ng lint @company/app
The log given by the failure
Linter errors for files under projects/company/app/src/apis/widgets/**
Desired functionality
The glob seems like it should match all files under app/src/apis/widgets
and exclude them. The path is relative to the angular.json file and is consistent with other paths in the architect configuration.
Oddly, **/projects/company/app/src/apis/widgets/**
does exclude the files. Also, ./projects/company/app/src/apis/widgets/**
does not.
Related issue
The exclude
option in the tslint.json file inside projects/company/app
appears to get ignored or clobbered by the angular.json setting. Ideally you could exclude files using tslint.json and ensure editors that are unaware of angular.json also exclude the right files.