https://github.com/spoqa/eslint-config-spoqa
Spoqa Javascript Style Guide
https://github.com/spoqa/eslint-config-spoqa
Last synced: 11 months ago
JSON representation
Spoqa Javascript Style Guide
- Host: GitHub
- URL: https://github.com/spoqa/eslint-config-spoqa
- Owner: spoqa
- Created: 2020-08-24T05:33:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-25T02:21:06.000Z (over 4 years ago)
- Last Synced: 2025-02-27T16:04:48.226Z (over 1 year ago)
- Language: JavaScript
- Size: 247 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# eslint-config-spoqa
스포카 내에서 사용되는 자바스크립트 스타일 가이드입니다.
지금은 TypeScript 프로젝트에만 사용할 수 있습니다.
## 사용 방법
### Install
```bash
$ yarn add -D @spoqa/eslint-config-spoqa
```
### Config
`.eslintrc.yaml` 등의 파일을 추가하고 다음 예제처럼 설정을 extends에 추가합니다.
다음 예시는 prettier를 함께 사용하는 next.js 프로젝트의 설정입니다.
```yaml
parserOptions:
project: tsconfig.json
extends:
- '@spoqa/eslint-config-spoqa/react'
- '@spoqa/eslint-config-spoqa/recommended'
- '@spoqa/eslint-config-spoqa/next'
- prettier
- 'prettier/@typescript-eslint'
- prettier/react
```
## 예시
### Custom import groupingg
```yaml
---
rules:
import/order:
- error
- groups:
- builtin
- external
- internal
- parent
- sibling
- index
pathGroups:
- pattern: 'dumb/**'
group: internal
position: before
- pattern: 'components/**'
group: internal
position: before
- pattern: 'public/**'
group: index
position: after
alphabetize:
order: asc
```
### 절대경로 import 지원
```yaml
---
settings:
import/resolver:
node:
paths:
- .
```
## 기능 추가 및 릴리즈
[CONTRIBUTING.md](./CONTRIBUTING.md)를 확인해주세요.