“TSLint 仍然存在” => 从 TSlint 升级到 ESLint

Posted

技术标签:

【中文标题】“TSLint 仍然存在” => 从 TSlint 升级到 ESLint【英文标题】:"TSLint still there" => upgrading from TSlint to ESLint 【发布时间】:2021-09-16 18:51:19 【问题描述】:

我正在处理 angular 10 项目,该项目已升级到 angular 12。TSLint 不再用于 angular 12,但由于该项目已升级到 angular 12,它仍然具有 tslint.json 及其包。如何删除它?该项目也使用了prettier。

package.json


  "name": "academic-schedule",
  "version": "0.0.0",
  "scripts": 
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "format:check": "prettier \"src/app,environments/**/*.ts,.html,.json,.scss\" --check",
    "format:write": "prettier \"src/app,environments/**/*.ts,.html,.json,.scss\" --write"
  ,
  "private": true,
  "dependencies": 
    "@angular/animations": "^12.1.1",
    "@angular/cdk": "^12.1.1",
    "@angular/common": "^12.1.1",
    "@angular/compiler": "^12.1.1",
    "@angular/core": "^12.1.1",
    "@angular/flex-layout": "^12.0.0-beta.34",
    "@angular/forms": "^12.1.1",
    "@angular/http": "^7.2.16",
    "@angular/material": "^12.1.1",
    "@angular/platform-browser": "^12.1.1",
    "@angular/platform-browser-dynamic": "^12.1.1",
    "@angular/router": "^12.1.1",
    "@fullcalendar/angular": "^5.8.0",
    "@fullcalendar/daygrid": "^5.8.0",
    "core-js": "^3.15.2",
    "jwt-decode": "^3.1.2",
    "primeflex": "^2.0.0",
    "primeicons": "^4.1.0",
    "primeng": "^11.4.3",
    "rxjs": "^7.2.0",
    "rxjs-compat": "^6.6.7",
    "tslib": "^2.3.0",
    "zone.js": "^0.11.4"
  ,
  "devDependencies": 
    "@angular-devkit/build-angular": "^12.1.1",
    "@angular/cli": "^12.1.1",
    "@angular/compiler-cli": "^12.1.1",
    "@angular/language-service": "^12.1.1",
    "@types/jasmine": "^3.7.7",
    "@types/jasminewd2": "^2.0.9",
    "@types/node": "^16.0.0",
    "codelyzer": "^6.0.2",
    "jasmine-core": "^3.8.0",
    "jasmine-spec-reporter": "^7.0.0",
    "karma": "^6.3.4",
    "karma-chrome-launcher": "^3.1.0",
    "karma-cli": "^2.0.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "^4.0.1",
    "karma-jasmine-html-reporter": "^1.6.0",
    "prettier": "^2.3.2",
    "protractor": "^7.0.0",
    "rxjs-tslint": "^0.1.8",
    "ts-node": "~8.3.0",
    "tslint": "^6.1.3",
    "typescript": "^4.3.5",
    "webpack": "^5.42.1"
  


【问题讨论】:

我已尝试多次编辑此帖子,但出现无法解决的错误。我想更改标题:“TSLint 仍然存在”=> 从 TSlint 升级到 ESLint。并在底部添加 TSLint 和 ESLint-tags。这只是为了增加有相同问题的人偶然发现该主题的几率。 【参考方案1】:

这可以提供解决方案Nx: Migrating Angular Applications From TSLint to ESLint吗?

希望这会有所帮助!保重,祝你好运!

【讨论】:

我刚刚将我的组件、模块等带入了最新的 angular 12 解决方案。但是,确实如此。我只使用更漂亮的,不确定是否更漂亮 + ESLint 是一个东西。

以上是关于“TSLint 仍然存在” => 从 TSlint 升级到 ESLint的主要内容,如果未能解决你的问题,请参考以下文章

升级 HTTPS,价值何在?

微信小程序SSL证书开启服务器TSL1.0TSL1.1TSL1.2服务

你的网站升级https了吗

网络与系统安全关于SSL/TSL协议的分析

iOS安全系列之 HTTPS

树莓派——TSL2561获取光强数值(C语言)