Linting & Testing / Jest, ESlint 설치

2019. 2. 11. 23:49·Dev Tools

code quality란?

1. 코드가 해야 할 일을합니다.

2. 코드에 결함이나 문제점이 없어야 합니다

3. 코드가 읽기 쉽고, 유지와 확장성이 좋아야 합니다.


code quality를 향상 시키기 위해선?

1. Test

- 1번과 2번을 향상

- Testing Tool

: Unit Test - Jest

: Integration Test

: End to End Test (front end to back end)


2. Linter

- 2번과 3번을 향상

- Airbnb Style Guide : https://github.com/airbnb/javascript

- Logical Lint

: 코드에 오류가 있는지 확인

: 잠재적으로 의도하지 않은 결과가 있는 코드 확인

: 위험한 코드 패턴이 있는지 확인

- When

: IDE 용 코드 - 플러그인을 작성할 때

: 코드를 커밋 할 때 - Git hooks

: 테스트를 실행할 때 - CI

- ESlint : Logical & Stylistic Linting


Jest

- DOCS : https://jestjs.io/

- 함수 정리 : https://flaviocopes.com/jest/#run-jest-with-vs-code

- To Do 

1. install Jest on your root folder.

2. Go to test-example folder, check what fucntionts in math.js do.

3. Go to test-exmpalge/__test__ foler and create test cases on math.js.

4. Check your test cases run correctly by typing npm run test:example on your terminal.


ESlint 

- DOCS : https://eslint.org/

- 참고 사이트 

: https://flaviocopes.com/eslint/

: https://hackernoon.com/how-to-use-eslint-in-node-js-applications-cc4b2298ce55

- To Do

1. Configure ESlint extends property to "recommended". 

2. Integrate ESlint to your Editor.

3. ADVANCE Integrate ESlint to Git Precommit Hook (Do not use any framework).


'Dev Tools' 카테고리의 다른 글

node debugger  (0) 2019.03.05
VScode에서 리눅스 Bash 연동 하기  (0) 2019.02.12
톰캣(tomcat) 설치  (0) 2018.08.21
이클립스 다운로드  (0) 2018.08.20
자바 jdk 다운로드  (0) 2018.08.20
'Dev Tools' 카테고리의 다른 글
  • node debugger
  • VScode에서 리눅스 Bash 연동 하기
  • 톰캣(tomcat) 설치
  • 이클립스 다운로드
vitnal
vitnal
4년차 프론트엔드 개발자입니다. react를 사용하여 웹 서비스를 개발한 경험이 있습니다. github: https://github.com/jch1223
  • vitnal
    vitnal 아카이브
    vitnal
  • 전체
    오늘
    어제
    • 분류 전체보기 (146)
      • AI (1)
      • WEB (76)
        • React (21)
        • Nextjs (17)
        • JavaScript (16)
        • React Native (5)
        • HTML & CSS (7)
      • CS (3)
      • Git (15)
      • Dev Tools (23)
      • Deploy (12)
      • Tech Memo (8)
      • Retrospect (7)
  • 반응형
  • hELLO· Designed By정상우.v4.10.5
vitnal
Linting & Testing / Jest, ESlint 설치
상단으로

티스토리툴바