From 28de832f34af9cb8ba04a43a5d89ee21d5023529 Mon Sep 17 00:00:00 2001 From: pja9362 Date: Tue, 6 Jan 2026 18:35:57 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[#141]=20refactor(editorconfig):=20postinst?= =?UTF-8?q?all=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - package.json에서 postinstall 스크립트 제거 - index.js, createConfigFile.js 파일 삭제 - README.md 업데이트 (CLI 사용 안내 추가) pnpm v10+에서 postinstall이 기본 차단되는 문제로 인해 code-style-cli를 통한 설정 파일 생성 방식으로 변경 --- packages/editorconfig/README.md | 15 ++++++------ packages/editorconfig/createConfigFile.js | 29 ----------------------- packages/editorconfig/index.js | 3 --- packages/editorconfig/package.json | 5 +--- 4 files changed, 9 insertions(+), 43 deletions(-) delete mode 100644 packages/editorconfig/createConfigFile.js delete mode 100644 packages/editorconfig/index.js diff --git a/packages/editorconfig/README.md b/packages/editorconfig/README.md index 66038a0..856194d 100644 --- a/packages/editorconfig/README.md +++ b/packages/editorconfig/README.md @@ -4,14 +4,15 @@ ## 설치 방법 +[`@naverpay/code-style-cli`](../code-style-cli/README.md)를 사용하여 설치하는 것을 권장합니다. + ```bash -npm install @naverpay/editorconfig -D +npx @naverpay/code-style-cli ``` -## 주의 사항 - -- pnpm 으로 설치 후 `.editorconfig` 파일이 생성되지 않았다면, `node_modules` 를 삭제 후 [side-effects-cache](https://pnpm.io/npmrc#side-effects-cache) 설정을 false로 하고 다시 설치해주세요. +또는 직접 설치 후 설정 파일을 복사할 수 있습니다. - ```bash - pnpm install @naverpay/editorconfig -D --side-effects-cache false - ``` +```bash +npm install @naverpay/editorconfig -D +cp node_modules/@naverpay/editorconfig/.editorconfig .editorconfig +``` diff --git a/packages/editorconfig/createConfigFile.js b/packages/editorconfig/createConfigFile.js deleted file mode 100644 index d0c6527..0000000 --- a/packages/editorconfig/createConfigFile.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable no-console */ -const {execSync} = require('child_process') -const fs = require('fs') -const path = require('path') - -const createConfigFile = (dirname, fileName, destFileName = fileName) => { - try { - const source = path.join(dirname, fileName) - const config = fs.readFileSync(source) - - const gitRoot = execSync('git rev-parse --show-toplevel').toString().trim() - const dest = path.join(gitRoot, destFileName) - - if (fs.existsSync(dest)) { - process.exit(0) - } - fs.writeFileSync(dest, config) - console.log(`${destFileName} is created successfully`) - } catch (error) { - console.log(`Failed to create ${destFileName}`) - console.log(error?.message) - process.exit(0) - } -} - -module.exports = { - createConfigFile, -} diff --git a/packages/editorconfig/index.js b/packages/editorconfig/index.js deleted file mode 100644 index 747492b..0000000 --- a/packages/editorconfig/index.js +++ /dev/null @@ -1,3 +0,0 @@ -const {createConfigFile} = require('./createConfigFile') - -createConfigFile(__dirname, '.editorconfig') diff --git a/packages/editorconfig/package.json b/packages/editorconfig/package.json index a662e7b..05d049f 100644 --- a/packages/editorconfig/package.json +++ b/packages/editorconfig/package.json @@ -13,8 +13,5 @@ }, "license": "MIT", "author": "@NaverPayDev/frontend", - "type": "commonjs", - "scripts": { - "postinstall": "node index.js" - } + "type": "commonjs" } From 9ff30ba5d3aeb02f7bc6755068273c50c9c04750 Mon Sep 17 00:00:00 2001 From: pja9362 Date: Tue, 6 Jan 2026 21:58:24 +0900 Subject: [PATCH 2/5] [#141] chore: add changeset for editorconfig major release --- .changeset/bright-wolves-dance.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/bright-wolves-dance.md diff --git a/.changeset/bright-wolves-dance.md b/.changeset/bright-wolves-dance.md new file mode 100644 index 0000000..388cb30 --- /dev/null +++ b/.changeset/bright-wolves-dance.md @@ -0,0 +1,5 @@ +--- +"@naverpay/editorconfig": major +--- + +postinstall 스크립트 제거 및 @naverpay/code-style-cli 사용 권장으로 설치 방식 변경 From 56097fb5fea78bbaff8c77c7b753ad1590a00d69 Mon Sep 17 00:00:00 2001 From: pja9362 Date: Tue, 6 Jan 2026 22:08:15 +0900 Subject: [PATCH 3/5] =?UTF-8?q?[#141]=20refactor(markdown-lint):=20postins?= =?UTF-8?q?tall=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/markdown-lint/README.md | 18 ++++++++++++------ packages/markdown-lint/package.json | 2 -- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/markdown-lint/README.md b/packages/markdown-lint/README.md index dc297d9..c741440 100644 --- a/packages/markdown-lint/README.md +++ b/packages/markdown-lint/README.md @@ -3,18 +3,24 @@ markdown 파일 검사용 lint 도구입니다. [DavidAnson/markdownlint](https://github.com/DavidAnson/markdownlint)에서 제공하는 패키지와 규칙을 사용하고 있으며, 몇 가지 rule은 커스텀 되어 있습니다. -## Installation +## 설치 방법 +[`@naverpay/code-style-cli`](../code-style-cli/README.md)를 사용하여 설치하는 것을 권장합니다. + +```bash +npx @naverpay/code-style-cli ``` -npm i @naverpay/markdown-lint -D + +또는 직접 설치 후 설정 파일을 생성할 수 있습니다. + +```bash +npm install @naverpay/markdown-lint -D +echo '{"extends": "@naverpay/markdown-lint"}' > .markdownlint.jsonc ``` ## Config -`@naverpay/markdown-lint`를 설치하면 `postinstall`을 통해 자동으로 `.markdownlint.json`이 생성됩니다. -이미 `.markdownlint.json`이 존재한다면 생성되지 않습니다. - -> [markdown-lint config](./.markdownlint.jsonc)는 [jsonc](https://code.visualstudio.com/docs/languages/json#_json-with-comments) 형식으로 작성되어 있어, 주석을 통해 rule에 대한 설명을 확인할 수 있습니다. +> [markdown-lint config](./.markdownlint.jsonc)는 [jsonc](https://code.visualstudio.com/docs/languages/json#_json-with-comments) 형식으로 작성되어 있어, 주석을 통해 rule에 대한 설명을 확인할 수 있습니다. > 각 규칙의 명세는 [여기](https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md)서 확인할 수 있습니다. ## Integrating with IDE diff --git a/packages/markdown-lint/package.json b/packages/markdown-lint/package.json index bc727e1..47103da 100644 --- a/packages/markdown-lint/package.json +++ b/packages/markdown-lint/package.json @@ -21,11 +21,9 @@ }, "files": [ "cli.js", - "postInstall", ".markdownlint.jsonc" ], "scripts": { - "postinstall": "node postInstall/index.js", "test": "jest --config jest.config.js" }, "dependencies": { From 673ff1290503eb1eec5c861703786a41a52781c5 Mon Sep 17 00:00:00 2001 From: pja9362 Date: Tue, 6 Jan 2026 22:14:13 +0900 Subject: [PATCH 4/5] [#141] chore: update changeset for markdown-lint major release --- .changeset/bright-wolves-dance.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.changeset/bright-wolves-dance.md b/.changeset/bright-wolves-dance.md index 388cb30..9f30cf9 100644 --- a/.changeset/bright-wolves-dance.md +++ b/.changeset/bright-wolves-dance.md @@ -1,5 +1,14 @@ --- "@naverpay/editorconfig": major +"@naverpay/markdown-lint": major --- -postinstall 스크립트 제거 및 @naverpay/code-style-cli 사용 권장으로 설치 방식 변경 +### Breaking Changes + +- `postinstall` 스크립트 제거로 자동 설정 파일 생성 기능이 제거됨 +- `@naverpay/code-style-cli` 사용을 권장하는 방식으로 설치 가이드 변경 + +### 변경 사항 + +- **@naverpay/editorconfig**: `postinstall` 스크립트 및 관련 파일(`createConfigFile.js`, `index.js`) 제거, README 업데이트 +- **@naverpay/markdown-lint**: `postinstall` 스크립트 제거 및 npm 배포 대상에서 `postInstall` 제외, README 업데이트 From e1e0d91dba99b354741c19d05ac36a1628b800f3 Mon Sep 17 00:00:00 2001 From: pja9362 Date: Tue, 13 Jan 2026 15:05:25 +0900 Subject: [PATCH 5/5] =?UTF-8?q?[#141]=20chore:=20changeset=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EC=9D=84=20=ED=8C=A8=ED=82=A4=EC=A7=80=EB=B3=84?= =?UTF-8?q?=EB=A1=9C=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/brave-tigers-fly.md | 18 ++++++++++++++++++ .changeset/bright-wolves-dance.md | 14 -------------- .changeset/gentle-clouds-march.md | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 .changeset/brave-tigers-fly.md delete mode 100644 .changeset/bright-wolves-dance.md create mode 100644 .changeset/gentle-clouds-march.md diff --git a/.changeset/brave-tigers-fly.md b/.changeset/brave-tigers-fly.md new file mode 100644 index 0000000..145dde0 --- /dev/null +++ b/.changeset/brave-tigers-fly.md @@ -0,0 +1,18 @@ +--- +"@naverpay/markdown-lint": major +--- + +### Breaking Changes + +- `postinstall` 스크립트 제거로 패키지 설치 시 자동 설정 파일 생성 기능이 제거됨 + - 기존: `npm install` 시 `.markdownlint.json` 파일이 프로젝트 루트에 자동 생성 + - 변경: 수동으로 설정 파일 생성 필요 또는 `@naverpay/code-style-cli` 사용 권장 + +### 코드 정리 + +- `package.json`에서 `postinstall` 스크립트 제거 +- npm 배포 대상(`files`)에서 `postInstall` 디렉토리 제외 + +### 문서 업데이트 + +- README에 새로운 설치 가이드 추가 (`@naverpay/code-style-cli` 사용 또는 수동 설정 방법 안내) diff --git a/.changeset/bright-wolves-dance.md b/.changeset/bright-wolves-dance.md deleted file mode 100644 index 9f30cf9..0000000 --- a/.changeset/bright-wolves-dance.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"@naverpay/editorconfig": major -"@naverpay/markdown-lint": major ---- - -### Breaking Changes - -- `postinstall` 스크립트 제거로 자동 설정 파일 생성 기능이 제거됨 -- `@naverpay/code-style-cli` 사용을 권장하는 방식으로 설치 가이드 변경 - -### 변경 사항 - -- **@naverpay/editorconfig**: `postinstall` 스크립트 및 관련 파일(`createConfigFile.js`, `index.js`) 제거, README 업데이트 -- **@naverpay/markdown-lint**: `postinstall` 스크립트 제거 및 npm 배포 대상에서 `postInstall` 제외, README 업데이트 diff --git a/.changeset/gentle-clouds-march.md b/.changeset/gentle-clouds-march.md new file mode 100644 index 0000000..4804835 --- /dev/null +++ b/.changeset/gentle-clouds-march.md @@ -0,0 +1,18 @@ +--- +"@naverpay/editorconfig": major +--- + +### Breaking Changes + +- `postinstall` 스크립트 제거로 패키지 설치 시 자동 설정 파일 생성 기능이 제거됨 + - 기존: `npm install` 시 `.editorconfig` 파일이 프로젝트 루트에 자동 생성 + - 변경: 수동으로 설정 파일 복사 필요 또는 `@naverpay/code-style-cli` 사용 권장 + +### 코드 정리 + +- `createConfigFile.js`, `index.js` 파일 삭제 +- `package.json`에서 `postinstall` 스크립트 제거 + +### 문서 업데이트 + +- README에 새로운 설치 가이드 추가 (`@naverpay/code-style-cli` 사용 또는 수동 복사 방법 안내)