FrontEngineer JungBam

jest, eslint 설정 본문

jest

jest, eslint 설정

정밤톨 2023. 6. 15. 14:57

eslint-plugin 설치

npm install eslint-plugin-testing-library eslint-plugin-jest-dom

.vscode/setting.json

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true
}

.eslintrc.json

{
    "plugins": [
        "testing-library",
        "jest-dom"
    ],
    "extends": [
        "react-app",
        "react-app/jest",
        "plugin:testing-library/react",
        "plugin:jest-dom/recommended"
    ]
}

 

반응형
Comments