前提・実現したいこと
herokuのデプロイ時に以下のようなエラーがでて困っています。
調べてみたところ、"eslint-config-prettier"を入れれば直ったということが書かれていたのですが、
入れてみても変化はありませんでした。
何が原因かわかる方がいましたらコメントお願いします。
発生している問題・エラーメッセージ
Failed to load config "prettier" to extend from. Referenced from: /app/.eslintrc.js
該当のソースコード
{ "name": "grid_image_ts_app", "version": "0.1.0", "private": true, "dependencies": { "@emotion/react": "^11.1.5", "@emotion/styled": "^11.1.5", "@material-ui/core": "^5.0.0-alpha.26", "@material-ui/icons": "^4.11.2", "@testing-library/jest-dom": "^5.11.9", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^12.7.2", "@types/jest": "^26.0.20", "@types/node": "^12.20.4", "@types/react": "^17.0.2", "@types/react-dom": "^17.0.1", "axios": "^0.21.1", "npm-run-all": "^4.1.5", "react": "^17.0.1", "react-dom": "^17.0.1", "react-redux": "^7.2.2", "react-scripts": "4.0.3", "react-toast-notifications": "^2.4.3", "redux": "^4.0.5", "redux-devtools-extension": "^2.13.9", "redux-thunk": "^2.3.0", "typescript": "^4.0.2", "web-vitals": "^1.1.0" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] }, "devDependencies": { "@types/react-redux": "^7.1.16", "@typescript-eslint/eslint-plugin": "^3.10.1", "@typescript-eslint/parser": "^3.10.1", "axios-mock-server": "^0.19.1", "eslint-config-airbnb": "^18.2.1", "eslint-config-prettier": "^6.15.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-react": "^7.22.0", "eslint-plugin-react-hooks": "^4.2.0", "prettier": "^2.2.1" } }
eslintrc
1module.exports = { 2 root: true, 3 parser: '@typescript-eslint/parser', 4 plugins: [ 5 '@typescript-eslint', 6 ], 7 extends: [ 8 'eslint:recommended', 9 'plugin:@typescript-eslint/recommended', 10 'prettier', 11 'prettier/@typescript-eslint', 12 ], 13}; 14 15
あなたの回答
tips
プレビュー