# ESLint

## Linter를 사용 시 좋은 점

초보자도 고수처럼 코딩할 수 있다.

## airbnb linter 설정방법

create-react-app 으로 만든 project 라고 가정.

### &#x20;1. eslint를 위한 airbnb 설정을 설치한다.

`yarn add eslint-config-airbnb`

### 2. .eslintrc 파일 생성&#x20;

{% code title=".eslintrc" %}

```javascript
{
  "env": {
    "browser": true,
    "es6": true,
    "jest": true
  },
  "parser": "babel-eslint",
  "extends": [
    "airbnb"
  ],
  "plugins": [
    "react"
  ],
  "rules": {
    "strict": "error"
  }
}

```

{% endcode %}

제가 사용중인 설정입니다.

### 3. 빨간 줄을 맞이하고 해결한다.

:D

## 추가 정보

[eslint rules](https://eslint.org/docs/rules/)

[eslint-plugin-rules](https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules)

[airbnb javascript code style](https://github.com/airbnb/javascript)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.javabom.com/kimdh/web/react/eslint.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
