簡體   English   中英

eslint 命令在 CI 服務器上失敗,並出現錯誤“ESLint 找不到要擴展的配置”標准“”

[英]eslint command fails on CI Server with error “ESLint couldn't find the config ”standard“ to extend from”

我有 eslint 配置,在我的本地設置(使用 vscode 編輯器)上運行良好。

但在 CI 服務器上,它失敗並出現以下錯誤:

  eslint:config-array-factory Config file found: /home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json +0ms
  eslint:config-array-factory Loading {extends:"standard"} relative to /home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json +1ms

Oops! Something went wrong! :(

ESLint: 6.6.0.

ESLint couldn't find the config "standard" to extend from. Please check that the name of the config is correct.

The config "standard" was referenced from the config file in "/home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json".

If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team.

我正在運行以下命令來 lint:

./node_modules/.bin/eslint./ --ext.ts

我看到 git 上存在多個與此相關的問題( https://github.com/microsoft/vscode-eslint/issues/696 )但沒有解決方案或對我不起作用。

任何人都可以在這里幫助我。

似乎沒有安裝 eslint-config-standard-with-typescript。

嘗試這個:

npm install --save-dev eslint@7 eslint-plugin-promise@4 eslint-plugin-import@2 eslint-plugin-node@11 @typescript-eslint/eslint-plugin@4 eslint-config-standard-with-typescript

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM