react刪除eslint的方法:1、執(zhí)行“npm run eject”命令;2、在package.json中修改代碼為“ "eslintConfig": {"extends": ["react-app","react-app/jest"],"rules": {"no-undef": "off"…}”;3、重啟項目即可。
本教程操作環(huán)境:Windows10系統(tǒng)、react17版、Dell G3電腦。
react怎么刪除eslint?
React關(guān)閉Eslint代碼檢查
1、npm run eject
2、在package.json 中修改代碼
"eslintConfig": { "extends": [ "react-app", "react-app/jest" ], "rules": { "no-undef": "off", "no-restricted-globals": "off", "no-unused-vars": "off" } },
登錄后復(fù)制
3、重啟項目
推薦學(xué)習(xí):《react視頻教程》