This is a follow up on https://github.com/angular/angular-cli/pull/13811, with this now all application have the same structure and hence `ng g service-worker` should follow suit and have the same folder strucute if generated in a root app, or an app inside the projects.
`Component` selectors are always kekabed while `Directive` selectors are always camelized. This updates the lint rules to convert the prefix to the appropiate case
Fixes#13796
This commit fixes a few issues with json-utils:
1. The implementation is lacking tests
2. The implementation hardcodes indent = 2 in many places and
does not respect the `indent` parameter passed by users
3. The implementation is buggy when passed an empty object or array
At the moment users can have various casing and seperatirs in paths, we should not always dasherize the name when resolving modules.
As for example when providing something like:
```
/module/SubModule/feature
```
It won't be able to resolve the modules properly as `sub-module` does't exist.
This PR also updates the test for underscore as previously it was not properly testing this usercase, since the formatter was used on name and not th path.
Fixes#13714
Angular 5.0+ has a full peer dependencies setup (with 6.0+ also having a configurable runtime error check) to ensure that an appropriate version of typescript is available for compilation. Angular CLI 8.0+ does not support Angular versions prior to these and therefore the warning is redundant. For the case where the developer wishes to use an unsupported TypeScript version, the developer would need to adjust two similar but differently name settings in two different configuration files.
This is causing major confusion as users are not aware that choosing `sass` will generate files with `scss` extension.
Another reason for this confusion is that in other schematics, `style` accepts either a preprocessor or file extension while in this prompt only a preprocessor is provided.
We could do this only when we know the user has opted into using Bazel, like in the @angular/bazel schematics.
However, the complexity of amending new lines to the .gitignore isn't worth it, when we can just add one line here.
Fixes#13636
If using `strictFunctionTypes: true` in `tsconfig.json`, the default e2e test is failing compilation with:
```
error TS2345: Argument of type 'ObjectContaining<{ level: Level; }>' is not assignable to parameter of type 'Expected<Entry>'.
Type 'ObjectContaining<{ level: Level; }>' is not assignable to type 'ObjectContaining<Entry>'.
Type 'Partial<{ level: Level; }>' is not assignable to type 'Partial<Entry>'.
Type '{ level: Level; }' is not assignable to type 'Entry'.
```
Explictely using `as logging.Entry` fixes the issue.
Users outside of Google don't usually need closure annotations.
We should also follow up with ng-packagr to remove tsickle from peerDependency and afterwards, we be able to remove tsickle from the added dependencies when running this schematic
Currently when using `ivy-ngcc` it will print out a warning
```
Failed to read entry point info from //node_modules/@schematics/angular/workspace/files/package.json with error SyntaxError: Unexpected token < in JSON at position 1121.
```
Fixes#13378