Skip to content
On this page

2020-11-21

Title
2020-11-21
Category
2020
Tags
Aliases
2020-11-21
Created
3 years ago
Updated
last year

ESLint

  • 포맷팅

  • 코드 품질

규칙

rules 로 추가 가능

  • 자동으로 수정할 수 있는 규칙과 그렇지 않은 규칙이 있음.

  • 규칙 목록 중 렌치 기호가 붙은 것이 자동으로 수정할 수 있는 규칙

  • --fix 옵션으로 수정할 수 있다.

List of available rules

Extends

  • 여러 규칙을 모아놓은 것들

  • eslint:recommended , eslint-config-airbnb-base , eslint-config-standard 등이 있다.

init

--init 옵션으로 대화식으로 설정 가능

bash
npx eslint --init

? How would you like to use ESLint?
? What type of modules does your project use?
? Which framework does your project use?
? Where does your code run?
? How would you like to define a style for your project?
? Which style guide do you want to follow?
? What format do you want your config file to be in?
npx eslint --init

? How would you like to use ESLint?
? What type of modules does your project use?
? Which framework does your project use?
? Where does your code run?
? How would you like to define a style for your project?
? Which style guide do you want to follow?
? What format do you want your config file to be in?

Prettier와의 통합

Integrating with Linters · Prettier

Create-React-App with TypeScript, ESLint, Prettier, and GitHub Actions

Released under the MIT License.