인프런 커뮤니티 질문&답변
babel-eslint에 관해서 질문드립니다.
해결된 질문
작성
·
372
0
안녕하세요 제로초님 강의 잘듣고있습니다.
해당 강의를 듣고 eslint, prettier의 사용법을 공부한 뒤 프로젝트에 적용했고 다행히 정상적으로 동작합니다.
근데 제가 참고한 자료에서는 다른 패키지는 동일하게 설치하는데 유일하게 babel-eslint만 설치안하고 적용을 하더라고요
지금 제가한 설정에서 babel-eslint를 삭제하면 문제가 될까요?
// .eslintrc파일
{
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"extends": [
"airbnb",
"plugin:prettier/recommended"
],
"plugins": [
"import",
"react-hooks"
],
"rules": {
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/anchor-is-valid": "off",
"no-console": "off",
"no-underscore-dangle": "off",
"react/forbid-prop-types": "off",
"react/jsx-filename-extension": "off",
"react/jsx-one-expression-per-line": "off",
"object-curly-newline": "off",
"linebreak-style": "off",
"no-param-reassign": "off"
}
}
// .prettierrc 파일
{
"singleQuote": true,
"semi": true,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 80
}
// package.json 파일
{
"name": "recipe.io",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "next"
},
"author": "Mirrer",
"license": "ISC",
"dependencies": {
"@ant-design/icons": "^4.7.0",
"antd": "^4.21.3",
"axios": "^0.27.2",
"immer": "^9.0.15",
"next": "^12.1.6",
"next-redux-wrapper": "^6.0.2",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.2",
"redux": "4.1",
"redux-devtools-extension": "^2.13.9",
"redux-saga": "^1.1.3",
"shortid": "^2.2.16",
"styled-components": "^5.3.5"
},
"devDependencies": {
"@faker-js/faker": "^7.3.0",
"babel-eslint": "^10.1.0",
"eslint": "^8.18.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.7.1"
}
}




