Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/changesets-detect-add.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- '**'
types: [opened, reopened, synchronize]
types: [opened, reopened, synchronize, labeled, unlabeled]

jobs:
detect-add:
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@
"markdownlint:fix": "markdownlint --fix '**/*.md' '#.changeset' '#**/CHANGELOG.md'",
"test": "turbo test",
"test:watch": "turbo test:watch",
"release": "changeset publish"
"release": "pnpm build && changeset publish",
"release:canary": "pnpm build && changeset publish --tag canary"
},
"devDependencies": {
"@babel/preset-react": "^7.24.7",
"@changesets/cli": "^2.26.2",
"@naverpay/eslint-config": "workspace:*",
"@naverpay/markdown-lint": "workspace:*",
"@naverpay/prettier-config": "workspace:*",
"@naverpay/stylelint-config": "workspace:*",
"glob": "^9.3.4",
"lefthook": "^1.9.3",
"prettier": "^3.2.5",
"turbo": "^2.3.3",
Expand Down
2 changes: 0 additions & 2 deletions packages/editorconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"version": "0.0.4",
"description": "editorconfig for naverpay",
"scripts": {
"version": "pnpm version",
"deploy": "pnpm publish",
"postinstall": "node index.js"
},
"author": "@NaverPayDev/frontend",
Expand Down
20 changes: 8 additions & 12 deletions packages/eslint-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,23 @@

네이버페이 스타일 가이드에 맞게 lint rule을 커스텀하여 제공합니다.

## 설치 방법
## 사용 방법

```bash
npm install @naverpay/eslint-config -D
```

## 사용 방법

프로젝트 환경에 알맞는 config를 import해 사용합니다.

- **node**
- JS로 작성된 node 환경에서 사용합니다.
- **typescript**
- TS로 작성된 환경에서 사용합니다.
- **react**
- TS로 작성된 react17+ 환경에서 사용합니다.
- **strict**
- [eslint-plugin-unicorn](https://www.npmjs.com/package/eslint-plugin-unicorn), [eslint-config-sonarjs](https://www.npmjs.com/package/eslint-plugin-sonarjs) 등을 적용해 보다 엄격한 룰을 원하는 환경에서 사용합니다.
- `node` - JS로 작성된 node 환경에서 사용
- `typescript` - TS로 작성된 환경에서 사용
[Note: `@typescript-eslint` 룰 중 일부는 `yaml`룰과 충돌할 수 있으니 유의하시기 바랍니다.](https://github.com/NaverPayDev/code-style/commit/948890376bb250d975e50d5f82e418a3eb50bb7c#diff-d6e0200228324b775c1bd5390161c9d64f8a4581b542d5e93463abe457cd73caR6-R15)
- `react` - TS로 작성된 react17+ 환경에서 사용
- `strict` - 보다 엄격한 룰을 원하는 환경에서 위 config와 함께 사용

예시 `eslint.config.js`

```js
// eslint.config.js
import naverpay from '@naverpay/eslint-config'

export default [
Expand Down
43 changes: 20 additions & 23 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,26 @@
"prebuild": "pnpm run clean",
"build": "rollup -c",
"test": "vitest run",
"test:watch": "vitest watch",
"version": "pnpm version",
"deploy": "pnpm publish"
"test:watch": "vitest watch"
},
"peerDependencies": {
"@babel/eslint-parser": "^7.25.9",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-transform-react-jsx": "^7.14.5",
"author": "@NaverPayDev/frontend",
"repository": {
"type": "git",
"url": "https://github.com/NaverPayDev/code-style.git",
"directory": "packages/eslint-config"
},
"homepage": "https://github.com/NaverPayDev/code-style",
"keywords": [
"naverpay",
"eslint",
"eslintconfig",
"eslint-config"
],
"license": "MIT",
"dependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.15.0",
"@naverpay/eslint-plugin": "workspace:*",
"@typescript-eslint/eslint-plugin": ">=8",
"@typescript-eslint/parser": ">=8",
"eslint": ">=9",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": ">=2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
Expand All @@ -48,23 +54,14 @@
"neostandard": "^0.11.9",
"typescript-eslint": "^8.18.0"
},
"author": "@NaverPayDev/frontend",
"repository": {
"type": "git",
"url": "https://github.com/NaverPayDev/code-style.git",
"directory": "packages/eslint-config"
},
"homepage": "https://github.com/NaverPayDev/code-style",
"keywords": [
"naverpay",
"eslint",
"eslintconfig"
],
"license": "MIT",
"devDependencies": {
"@rollup/plugin-json": "^6.1.0",
"builtin-modules": "^4.0.0",
"eslint": "^9.17.0",
"rollup": "^4.27.4",
"vitest": "^2.1.5"
},
"peerDependencies": {
"eslint": ">=9"
}
}
43 changes: 21 additions & 22 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,7 @@
"prebuild": "pnpm run clean",
"build": "rollup -c",
"test": "vitest run",
"test:watch": "vitest watch",
"version": "pnpm version",
"deploy": "pnpm publish"
},
"devDependencies": {
"@babel/eslint-parser": "^7.25.9",
"@rollup/plugin-json": "^6.1.0",
"@typescript-eslint/parser": "^8.15.0",
"builtin-modules": "^4.0.0",
"rollup": "^4.27.4",
"vitest": "^2.1.5"
},
"peerDependencies": {
"eslint": ">=9"
},
"dependencies": {
"@naverpay/ast-parser": "^0.0.2",
"micromatch": "^4.0.8",
"minimatch": "^9.0.4",
"svgo": "^3.3.2"
"test:watch": "vitest watch"
},
"author": "@NaverPayDev/frontend",
"repository": {
Expand All @@ -51,8 +32,26 @@
"keywords": [
"naverpay",
"eslint",
"plugin",
"eslintplugin",
"eslint-plugin"
],
"license": "MIT"
"license": "MIT",
"dependencies": {
"@naverpay/ast-parser": "^0.0.2",
"micromatch": "^4.0.8",
"minimatch": "^9.0.4",
"svgo": "^3.3.2"
},
"devDependencies": {
"@babel/eslint-parser": "^7.25.9",
"@babel/preset-react": "^7.24.7",
"@rollup/plugin-json": "^6.1.0",
"@typescript-eslint/parser": "^8.15.0",
"builtin-modules": "^4.0.0",
"rollup": "^4.27.4",
"vitest": "^2.1.5"
},
"peerDependencies": {
"eslint": ">=8.57.0"
}
}
2 changes: 0 additions & 2 deletions packages/markdown-lint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
".markdownlint.jsonc"
],
"scripts": {
"version": "pnpm version",
"deploy": "pnpm publish",
"postinstall": "node postInstall/index.js",
"test": "jest --config jest.config.js"
},
Expand Down
5 changes: 1 addition & 4 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"version": "1.0.0",
"description": "prettier config for naverpay",
"main": "index.json",
"scripts": {
"version": "pnpm version",
"deploy": "pnpm publish"
},
"scripts": {},
"peerDependencies": {
"prettier": "^2.8.8 || ^3.0.0"
},
Expand Down
5 changes: 1 addition & 4 deletions packages/stylelint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"version": "0.0.3",
"description": "stylelint config for naverpay",
"main": "index.js",
"scripts": {
"version": "pnpm version",
"deploy": "pnpm publish"
},
"scripts": {},
"peerDependencies": {
"postcss": "^8.4.8",
"postcss-scss": "^4.0.3",
Expand Down
Loading
Loading