Error while loading rule 'prettier/prettier': context.getPhysicalFilename is not a function Occurred while linting G:\quiz-app\src\index.js
当我按 ctrl+s 将我的代码保存在 vs-code 中时,为什么会发生这种情况?
最佳答案
发生这种情况是因为 eslint-plugin-prettier@4.0.0 与 react-scripts 使用的 eslint@7.11.0 不兼容,需要升级到 eslint@7.32.0。
您需要通过运行 yarn upgrade -R eslint
来升级 eslint 的版本
https://stackoverflow.com/questions/69424343/