[英]Eslint configuration error when saving my code
Error while loading rule 'prettier/prettier': context.getPhysicalFilename is not a function Occurred while linting G:\\quiz-app\\src\\index.js
加载规则 'prettier/prettier' 时出错:context.getPhysicalFilename 不是函数在 linting G:\\quiz-app\\src\\index.js 时发生
Why is this happening when I have saved my code in vs-code by pressing ctrl+s?当我通过按 ctrl+s 将代码保存在 vs-code 中时,为什么会发生这种情况?
This happens because eslint-plugin-prettier@4.0.0 is not compatible with eslint@7.11.0 which react-scripts uses and requires an upgrade to eslint@7.32.0.发生这种情况是因为 eslint-plugin-prettier@4.0.0 与 react-scripts 使用的 eslint@7.11.0 不兼容,需要升级到 eslint@7.32.0。
You'll need to upgrade eslint's version by running yarn upgrade -R eslint
您需要通过运行
yarn upgrade -R eslint
来升级 eslint 的版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.