Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tslint migration does not consider an extends property containing an array #17311

Closed
1 of 15 tasks
sfabriece opened this issue Mar 26, 2020 · 5 comments 路 Fixed by #17323
Closed
1 of 15 tasks

Tslint migration does not consider an extends property containing an array #17311

sfabriece opened this issue Mar 26, 2020 · 5 comments 路 Fixed by #17323

Comments

@sfabriece
Copy link

sfabriece commented Mar 26, 2020

馃殌 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

Running ng update @angular/cli --migrate-only tslint-version-6

with a tslint config like this:

{
  "extends": [
    "tslint:recommended",
    "tslint-plugin-prettier",
    "tslint-config-prettier"
  ],
....

fails with

 tslint configuration does not extend "tslint:recommended".
    Migration will terminate as some rules might conflict.

The following file implements the migration.
https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-10/update-tslint.ts

Describe the solution you'd like

If you have a solution in mind, please describe it.

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?
@alan-agius4
Copy link
Collaborator

alan-agius4 commented Mar 27, 2020

Hi, thanks for the issues. Actually the problem here is the error message, as the migration will be executed when extending only tslint:recommended

@sfabriece
Copy link
Author

Can I contribute the fix to this @alan-agius4 ?

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Mar 28, 2020

@sfabriece, there is already a PR for this: #17323

Thanks anyways 馃檪

@francovp
Copy link

francovp commented Mar 30, 2020

For me, I did't have the "extends" array on my tslint.json and got the warning message, but the migration still completes

Using package manager: 'npm'
Collecting installed dependencies...
Found 67 dependencies.
** Executing 'tslint-version-6' of package '@angular/cli' **

> Update tslint to version 6.
    tslint configuration does not extend "tslint:recommended".
    Migration will terminate as some rules might conflict.
UPDATE package.json (3375 bytes)
UPDATE tslint.json (3099 bytes)
  Migration completed.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants