-1

Why " npm install " command warns "npm WARN deprecated tslint@6.1.3:" while installing Angular project?

npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.

  • Did you click the link to see more information? That message is quite clear. – R. Richards Jan 03 '21 at 16:16
  • https://stackoverflow.com/search?q=npm+WARN+deprecated – Nima Salehi Jan 03 '21 at 16:44
  • Deprecating a package or version will print a message to the terminal when a user installs it. A deprecation warning or message can say anything. You may wish to include a message encouraging users to update to a specific version, or an alternate, supported package. – Nima Salehi Jan 03 '21 at 17:32

2 Answers2

1

The angular uses tslint but it is deprecated as you mentioned. The angular team already prepared a lot and will remove tslint within the next version. The angular es lint project is aready there in version 1 (release the last days) and could be used already. They provide a migration path to avoid big issues during the change.

Thomas Renger
  • 779
  • 4
  • 12
  • Thank you you Thomas. For any TSLint rules with corresponding ESLint equivalents, those equivalents will be used in the new configuration. TSLint rules without ESLint equivalents will be wrapped with eslint-plugin-tslint. – Nima Salehi Jan 03 '21 at 17:39
1
npx tslint-to-eslint-config

tslint-to-eslint-config

The tslint-to-eslint-config command reads in any existing linter, TypeScript, and package configuration files, then creates an .eslintrc.js result based on them.

For any TSLint rules with corresponding ESLint equivalents, those equivalents will be used in the new configuration. TSLint rules without ESLint equivalents will be wrapped with eslint-plugin-tslint.

Rob
  • 14,746
  • 28
  • 47
  • 65