Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter exclude option does not exclude files matching glob? #11773

Closed
eppsilon opened this issue Aug 4, 2018 · 1 comment · Fixed by #11867
Closed

Linter exclude option does not exclude files matching glob? #11773

eppsilon opened this issue Aug 4, 2018 · 1 comment · Fixed by #11867

Comments

@eppsilon
Copy link

eppsilon commented Aug 4, 2018

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

  1. Create a new Angular workspace with a project named @company/app
  2. In projects/company/app/src/apis/widgets add at least one TS file with an error TS lint will catch
  3. In angular.json add this glob to the array under projects.@company/app.architect.lint.options.exclude: projects/company/app/src/apis/**"
  4. 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.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants