@nx/angular:convert-tslint-to-eslint
Convert an Angular project from TSLint to ESLint. NOTE: Does not work in --dry-run mode
.
This generator is deprecated and will be removed in a future version of Nx. Migrate to ESLint.
Convert an Angular project from TSLint to ESLint. NOTE: Does not work in --dry-run mode
.
1nx generate convert-tslint-to-eslint ...
2
By default, Nx will search for convert-tslint-to-eslint
in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
1nx g @nx/angular:convert-tslint-to-eslint ...
2
Show what will be generated without writing to disk:
1nx g convert-tslint-to-eslint ... --dry-run
2
The following will first configure the project, myapp
, the same way a new project is configured i.e. It will use Nx's new recommended ESLint config. By default, this also adds the existing TSLint configuration on top of the default ESLint config from Nx to continue checking what it checks today. This is done by migrating TSLint rules to their equivalent ESLint rules to the best of its abilities. Some TSLint rules may not have ESLint equivalents and will be reported during the conversion:
1nx g convert-tslint-to-eslint myapp
2
If your TSLint config isn't extremely important to you, ignoring it makes this process more deterministic. Unlike the prior example, this will discard the existing TSLint configuration, meaning that the project will only have the Nx's latest recommended ESLint configuration which may be good enough for some workspaces:
1nx g convert-tslint-to-eslint myapp --ignoreExistingTslintConfig=true
2
By default, this process removes the TSLint related dependencies and configuration once no more projects use TSLint. This can be disabled with the following flag to keep TSLint related dependencies and configuration in the repo:
1nx g convert-tslint-to-eslint myapp --removeTSLintIfNoMoreTSLintTargets=false
2
The name of the Angular project to convert. Please note, if the project is an Angular app with an associated Cypress e2e project, it will also attempt to convert that.
false
If true, it will not use existing TSLint config as a reference, it will just reset the project with the latest recommended ESLint config.
true
If this conversion leaves no more TSLint usage in the workspace, it will remove TSLint and related dependencies and configuration.
false
Skip formatting files.