angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

lint --files requires array, cannot lint single file

Open erika9star opened this issue 7 years ago β€’ 3 comments

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [x] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

No

Description

Cannot lint a single file using ng lint's --files parameter

πŸ”¬ Minimal Reproduction

ng new test-app
cd ../test-app
ng lint --files "src/app/app.component.ts"

πŸ”₯ Exception or Error


Schema validation failed with the following errors:
  Data path ".files" should be array.

🌍 Your Environment




Angular CLI: 6.2.9
Node: 8.12.0
OS: linux x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.8.9
@angular-devkit/build-angular     0.8.9
@angular-devkit/build-optimizer   0.8.9
@angular-devkit/build-webpack     0.8.9
@angular-devkit/core              0.8.9
@angular-devkit/schematics        0.8.9
@angular/cli                      6.2.9
@ngtools/webpack                  6.2.9
@schematics/angular               0.8.9
@schematics/update                0.8.9
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.16.4

erika9star avatar Feb 13 '19 15:02 erika9star

This is no longer an issue with CLI v8

ng lint --files src/app/app.component.ts 
Linting "test-project"...
All files pass linting.

This can probably be closed.

cexbrayat avatar Jun 15 '19 16:06 cexbrayat

Thanks @cexbrayat for looking into this.

Closing as indeed this issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

alan-agius4 avatar Jun 18 '19 13:06 alan-agius4

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.