Replace any remaining project TSLint setup with a clean ESLint setup. Migrate existing TSLint rules into ESLint only when the migrated rule passes against the current source without requiring source changes.
This step is intentionally configuration focused. Source files should not be changed to satisfy lint rules during this migration.
- Search workspace files for TSLint configuration and usage.
- Exclude dependencies, build output, generated documentation, and vendored files from migration decisions.
- Identify project TSLint configs, direct
tslintdependencies, directcodelyzerdependencies, old TSLint lint builders, andtslint:disablecomments. - Migrate only rules that exist in the project TSLint configuration.
- Keep only migrated ESLint rules that are green on the current source.
- Remove project TSLint config files and TSLint package references after the ESLint setup is verified.
- Do not rewrite source files for lint compliance.
- Do not broaden lint coverage to unrelated projects unless that was already part of the TSLint setup.
- Do not introduce new lint policy unrelated to the old TSLint rules.
- Do not use formatting rules in ESLint when Prettier already owns formatting.
- Do not keep TSLint as a bridge dependency unless no native ESLint equivalent exists and the rule is required.
- Record the current lint baseline with
npm run lint. - Search for project TSLint files and references:
tslint.json, nested TSLint configs,tslint,codelyzer, TSLint builders, andtslint:disablecomments. - Compare the working tree against
HEADbefore implementation because lint migration edits already exist locally. - Map each discovered TSLint rule to the closest supported ESLint rule from ESLint core,
typescript-eslint, orangular-eslint. - Add candidate migrated rules to
eslint.config.js. - Run ESLint against the configured lint target.
- If a migrated rule creates lint errors, remove that rule from this migration.
- Repeat until the migrated rule set is green.
- Remove project TSLint config files.
- Remove direct
tslintandcodelyzerentries frompackage.json. - Refresh the lockfile if package entries were removed.
- Run final verification with
npm run lint.
- Prefer native ESLint,
typescript-eslint, andangular-eslintequivalents. - Preserve the old TSLint intent only where a stable equivalent exists.
- Prefer warning free rules over partial compatibility.
- Avoid rules that require type information unless they are part of the old TSLint behavior and pass without unacceptable lint cost.
- Disable or omit any migrated rule that fails on current source.
- Migrate inline
tslint:disablecomments only when the equivalent ESLint rule is retained.
- No project TSLint config remains.
package.jsonhas no directtslintorcodelyzerdependency.eslint.config.jscontains only migrated rules that pass on the current source.npm run lintpasses.- No source files are changed for lint compliance in this step.
- Any removed TSLint rule is documented in the final migration summary with the reason it was not kept.
package.jsondirectly depends ontslintandcodelyzer.- Root
tslint.jsonusesnode_modules/codelyzeras its rules directory. projects/angular-oauth2-oidc-jwks/tslint.jsonextends the root config and overrides only selector rules.- The current lint script is
npm run lint, which runsng lint lib. - The workspace already has an ESLint flat config in
eslint.config.js.
Rules with clear ESLint candidates:
- Core JavaScript rules:
no-arg,no-console,no-construct,no-debugger,no-duplicate-super,no-eval,no-string-throw,no-switch-case-fall-through,no-unnecessary-initializer,no-var-keyword,radix,import-blacklist. - TypeScript rules:
callable-types,interface-over-type-literal,no-empty-interface,no-inferrable-types,no-misused-new,no-non-null-assertion,no-unused-expression. - Angular rules:
component-class-suffix,component-selector,directive-class-suffix,directive-selector,no-input-rename,no-inputs-metadata-property,no-output-on-prefix,no-output-rename,no-outputs-metadata-property,use-lifecycle-interface,use-pipe-transform-interface.
Rules to omit unless a non-formatting equivalent is useful and green:
- Formatting rules owned by Prettier:
comment-format,eofline,import-spacing,indent,max-line-length,no-trailing-whitespace,one-line,quotemark,semicolon,typedef-whitespace,whitespace. - Rules disabled in TSLint:
curly,member-access,no-empty,no-string-literal,object-literal-sort-keys,prefer-const,variable-name. - Rules without a low-cost direct migration target in this pass:
deprecation,forin,member-ordering,no-bitwise,no-shadowed-variable,triple-equals,unified-signatures,no-host-metadata-property.
At spec time, the working tree already contains local edits to lint configuration, package files, deleted TSLint configs, and sample source files. Treat those edits as concurrent work: re-read every target file immediately before editing, avoid reverting them, and keep implementation changes scoped to lint configuration and package cleanup unless the user explicitly approves source edits.