React
ESLint
ahleum
2022. 1. 22. 00:41
create-react-app으로 설치하면 기본적으로 설치가 된다
코드 스타일 (들여쓰기 등)을 공통적으로 스타일을 맞추기 좋다
모든 javascript 프로젝드에서 사용이 가능하다
ESLint - Pluggable JavaScript linter
Customize Preprocess code, use custom parsers, and write your own rules that work alongside ESLint's built-in rules. You can customize ESLint to work exactly the way you need it for your project.
eslint.org
파일을 작성하고
검사를 시행
터미널에 npx eslint index.js(파일명) 작성
검사한 내용을 고치고 싶다면 위에 보이는 것처럼 아까 작성한 구문에 --fix를 추가로 적어주면 된다.
npx eslint index.js(파일명) --fix
이 플러그인을 깔아주면
틀린부분을 알려준다. 깔아놓자!!