vscode 使用中遇到的问题

4,530 阅读1分钟

vscode unknow word cspell 调整级别

raw.githubusercontent.com无法连接

Problems loading reference 'https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.53/cspell.schema.json#/definitions/OverrideSettings': Unable to load schema from 'https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.53/cspell.schema.json': Request vscode/content failed unexpectedly without providing any details.

这是vscode中settings.json修改后遇到的问题,raw.githubusercontent.com无法连接,找了好些方法,以下方法对于我这个问题有效。

  • 解决方法如下:
  1. 点击进入 site.ip138.com/raw.githubu… 这个网站
  2. 输入域名查询IP地址, ping命令选取延迟低的IP地址
  3. 配置 C:\Windows\System32\drivers\etc 本地hosts 文件
151.101.76.133 raw.githubusercontent.com

4. 保存重新运行vscode

新版vscode配置eslint自动格式化代码

//新版(>1.41.0)配置
{
//autoFixedOnSave 设置已废弃,采用如下新的设置
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.format.enable": true,
//autoFix默认开启,只需输入字符串数组即可
"eslint.validate": ["javascript", "vue", "html"]
}

error commander@9.0.0: The engine "node" is incompatible with this module. Expected version "^12.20.0 || >=14". Got "12.13.1"

yarn config set ignore-engines true