The `esModuleInterop` option is recommended to be enable by TypeScript and corrects several assumptions TypeScript would otherwise make when importing CommonJS files.
This option change helps ensure compatibility as packages move towards ESM.
Reference: https://www.typescriptlang.org/tsconfig#esModuleInterop
All TypeScript files have been updated to pass the new eslint-based linting checks. eslint compatible disabling comments have also been added in place of the previous tslint comments.
In #16846, the URL for docs search was updated to point to the
corresponding vX.angular.io website (with an appropriate query for the
search). However, on the archive versions of the website (i.e. versions
older than the current stable), non-docs pages (including the home page)
are redirected to `/docs` (losing the query params).
This commit fixes the URL to include `/docs`, so that it is not
redirected (and preserve the query params that will trigger the search).
Follow-up to #14788 that allowed `ng doc --version 6`.
This commit enhances the doc command to use the current Angular version of the project by default, if no version is provided explicitely.
Fixes#12365
As the JSON Schema validation is minimum in the CLI, we have to also validate in code.
This PR:
- updates the JSON Schema to use `number` and `enum` instead of `integer` and `const` that are not supported.
- adds validation in the doc command implementation
- adds error reporting if the version is not valid
- fixes a typo in an error message in the parser
With this commit, we can now specify a `version`
for the `ng doc` command
ng doc --version 6
ng doc -v 6
and this will open `v6.angular.io` instead of `angular.io`.
The default domain is still used
if no version is specified.
Refs #12365