Angular CLI: 6.0.0
Node: 9.5.0
OS: darwin x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.6.0
@angular-devkit/build-angular 0.6.0
@angular-devkit/build-ng-packagr 0.6.0
@angular-devkit/build-optimizer 0.6.0
@angular-devkit/core 0.6.0
@angular-devkit/schematics 0.6.0
@angular/cdk 6.0.1
@angular/material 6.0.1
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.0.0
@schematics/angular 0.6.0
@schematics/update 0.6.0
ng-packagr 3.0.0-rc.3
rxjs 6.1.0
typescript 2.7.2
webpack 4.6.0
indent_size = 2 to indent_size = 4, and save.Both files ignore .editorconfig setting.
The file is provided purely for IDE usage and as a convenience thereof. The CLI does not otherwise use it. Post-generation formatting is currently at the discretion of the developer.
Post-generation formatting is currently at the discretion of the developer.
I understand that, even though I think that generating files with respect to .editorconfig would be a nice-to-have feature.
However, post-generation formatting isn't respected in the repro I described. angular.json gets reset to the CLI's internal generation default on ng new library ..., even if post-generation formatting has previously been applied.
Even if there is no .editorconfig Angular CLI should respect the existing indent it finds in the package.json
Yes, this is minor but still annoying. Npm does respect the codestyle therefore I would expect that tools who change it follow the same.
Editorconfig was created to unify settings for all editors so that files will be uniformly formatted with proper line endings, identation, etc. And it's widely adopted.
Since angular-cli creates/modifies files, it'd be great if it would also respect the setting.
Still waiting for this to happen 馃
Most helpful comment
Even if there is no .editorconfig Angular CLI should respect the existing indent it finds in the package.json
Yes, this is minor but still annoying. Npm does respect the codestyle therefore I would expect that tools who change it follow the same.