byuckchon-frontend-cli 1.9.7 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -5
- package/package.json +8 -2
- package/src/commands/adopt.js +12 -3
- package/src/constants/versions.js +12 -46
- package/src/generators/createApp.js +13 -29
- package/src/generators/createBaseFiles.js +79 -311
- package/src/generators/createFolders.js +17 -1
- package/src/generators/createMonorepo.js +49 -236
- package/src/generators/createPackageJson.js +10 -11
- package/src/generators/scaffoldReviewAutomation.js +41 -31
- package/src/utils/ensureRequiredDependencies.js +35 -9
- package/src/utils/settingsAssets.js +27 -0
- package/templates/review-automation/github/workflows/eslint-convention-review.monorepo.yml +8 -6
- package/templates/review-automation/github/workflows/eslint-convention-review.single.yml +6 -6
- package/templates/review-automation/github/workflows/pr-check.monorepo.yml +51 -0
- package/templates/review-automation/github/workflows/pr-check.single.yml +47 -0
- package/templates/review-automation/tools/review.config.mjs +9 -0
- package/templates/review-automation/tools/eslint-rules/internal-blocking-conventions.js +0 -1242
- package/templates/review-automation/tools/eslint-rules/internal-plugin.cjs +0 -8
- package/templates/review-automation/tools/eslint-rules/internal-rdjson-formatter.js +0 -60
- package/templates/review-automation/tools/eslint-rules/internal-warning-conventions.js +0 -57
- package/templates/review-automation/tools/eslint-rules/package.json +0 -3
- package/templates/review-automation/tools/eslint-rules/review.config.mjs +0 -22
- package/templates/review-automation/tools/post-eslint-review-comments.cjs +0 -309
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# ESLint 기반 기계적 컨벤션을 PR 인라인 댓글로 게시합니다.
|
|
2
2
|
# typecheck/lint/build 성공 여부는 PR Check workflow가 담당합니다.
|
|
3
3
|
#
|
|
4
|
-
# 각 패키지의 eslint.config
|
|
5
|
-
# tools/
|
|
6
|
-
#
|
|
4
|
+
# 각 패키지의 eslint.config에는 internal 플러그인이 없으므로,
|
|
5
|
+
# tools/review.config.mjs 전용 config로 레포 루트에서 PR 변경 파일만 검사합니다.
|
|
6
|
+
#
|
|
7
|
+
# 규칙과 게시 스크립트는 @byuckchon-frontend/settings 가 제공합니다.
|
|
8
|
+
# 프로젝트에 규칙 사본을 두지 않으므로, 규칙 변경은 settings 버전 업으로 반영됩니다.
|
|
7
9
|
|
|
8
10
|
name: ESLint Convention Review
|
|
9
11
|
|
|
@@ -62,9 +64,9 @@ jobs:
|
|
|
62
64
|
|
|
63
65
|
set +e
|
|
64
66
|
pnpm exec eslint "${changed_files[@]}" \
|
|
65
|
-
--config tools/
|
|
67
|
+
--config tools/review.config.mjs \
|
|
66
68
|
--no-error-on-unmatched-pattern \
|
|
67
|
-
-f
|
|
69
|
+
-f node_modules/@byuckchon-frontend/settings/src/eslint/internal-rdjson-formatter.js \
|
|
68
70
|
-o /tmp/eslint-conventions.rdjson
|
|
69
71
|
eslint_exit=$?
|
|
70
72
|
set -e
|
|
@@ -81,6 +83,6 @@ jobs:
|
|
|
81
83
|
REPO: ${{ github.repository }}
|
|
82
84
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
83
85
|
run: |
|
|
84
|
-
|
|
86
|
+
npx --no-install byuckchon-eslint-review-comments \
|
|
85
87
|
/tmp/eslint-conventions.rdjson \
|
|
86
88
|
eslint-conventions
|
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
|
|
22
22
|
- uses: actions/setup-node@v4
|
|
23
23
|
with:
|
|
24
|
-
node-version:
|
|
24
|
+
node-version-file: .nvmrc
|
|
25
25
|
cache: npm
|
|
26
26
|
|
|
27
27
|
- name: 의존성 설치
|
|
@@ -34,11 +34,11 @@ jobs:
|
|
|
34
34
|
REPO: ${{ github.repository }}
|
|
35
35
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
36
36
|
run: |
|
|
37
|
-
npx eslint .
|
|
38
|
-
--
|
|
39
|
-
--
|
|
40
|
-
-f
|
|
37
|
+
npx eslint . \
|
|
38
|
+
--config tools/review.config.mjs \
|
|
39
|
+
--no-error-on-unmatched-pattern \
|
|
40
|
+
-f node_modules/@byuckchon-frontend/settings/src/eslint/internal-rdjson-formatter.js \
|
|
41
41
|
-o /tmp/eslint-conventions.rdjson || true
|
|
42
|
-
|
|
42
|
+
npx --no-install byuckchon-eslint-review-comments \
|
|
43
43
|
/tmp/eslint-conventions.rdjson \
|
|
44
44
|
eslint-conventions
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# PR Check — 모노레포
|
|
2
|
+
#
|
|
3
|
+
# 기계적인 컨벤션은 ESLint Convention Review workflow 가 인라인 댓글로 알려주고,
|
|
4
|
+
# 이 workflow 는 "머지해도 되는가"(lint / typecheck / build 성공 여부)를 판정합니다.
|
|
5
|
+
#
|
|
6
|
+
# turbo 가 변경된 패키지만 골라 실행하고 캐시를 재사용합니다.
|
|
7
|
+
# 프로젝트 사정에 맞게 자유롭게 수정하세요. 이 파일은 프로젝트 소유입니다.
|
|
8
|
+
|
|
9
|
+
name: PR Check
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
pull_request:
|
|
13
|
+
types: [opened, synchronize, reopened]
|
|
14
|
+
branches:
|
|
15
|
+
- dev
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: pr-check-${{ github.event.pull_request.number }}
|
|
19
|
+
cancel-in-progress: true
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
check:
|
|
23
|
+
name: Lint · Typecheck · Build
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
# turbo 가 변경 범위를 계산할 수 있도록 히스토리를 가져옵니다.
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
|
|
34
|
+
- uses: pnpm/action-setup@v4
|
|
35
|
+
|
|
36
|
+
- uses: actions/setup-node@v4
|
|
37
|
+
with:
|
|
38
|
+
node-version-file: .nvmrc
|
|
39
|
+
cache: pnpm
|
|
40
|
+
|
|
41
|
+
- name: 의존성 설치
|
|
42
|
+
run: pnpm install --frozen-lockfile
|
|
43
|
+
|
|
44
|
+
- name: Lint
|
|
45
|
+
run: pnpm lint
|
|
46
|
+
|
|
47
|
+
- name: Typecheck
|
|
48
|
+
run: pnpm typecheck
|
|
49
|
+
|
|
50
|
+
- name: Build
|
|
51
|
+
run: pnpm build
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# PR Check — 단일 프로젝트
|
|
2
|
+
#
|
|
3
|
+
# 기계적인 컨벤션은 ESLint Convention Review workflow 가 인라인 댓글로 알려주고,
|
|
4
|
+
# 이 workflow 는 "머지해도 되는가"(lint / typecheck / build 성공 여부)를 판정합니다.
|
|
5
|
+
#
|
|
6
|
+
# 프로젝트 사정에 맞게 자유롭게 수정하세요. 이 파일은 프로젝트 소유입니다.
|
|
7
|
+
# - 대상 브랜치가 dev 가 아니라면 아래 branches 를 바꾸세요.
|
|
8
|
+
# - 테스트가 있다면 마지막에 단계를 추가하세요.
|
|
9
|
+
|
|
10
|
+
name: PR Check
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
pull_request:
|
|
14
|
+
types: [opened, synchronize, reopened]
|
|
15
|
+
branches:
|
|
16
|
+
- dev
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: pr-check-${{ github.event.pull_request.number }}
|
|
20
|
+
cancel-in-progress: true
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
check:
|
|
24
|
+
name: Lint · Typecheck · Build
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
- uses: actions/setup-node@v4
|
|
33
|
+
with:
|
|
34
|
+
node-version-file: .nvmrc
|
|
35
|
+
cache: npm
|
|
36
|
+
|
|
37
|
+
- name: 의존성 설치
|
|
38
|
+
run: npm ci
|
|
39
|
+
|
|
40
|
+
- name: Lint
|
|
41
|
+
run: npm run lint
|
|
42
|
+
|
|
43
|
+
- name: Typecheck
|
|
44
|
+
run: npm run typecheck
|
|
45
|
+
|
|
46
|
+
- name: Build
|
|
47
|
+
run: npm run build
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// ESLint Convention Review 워크플로 전용 config.
|
|
2
|
+
//
|
|
3
|
+
// 규칙 본체(internal 플러그인 + 컨벤션 규칙)는 @byuckchon-frontend/settings 가
|
|
4
|
+
// 관리합니다. 규칙이 바뀌면 settings 버전만 올리면 되고 이 파일은 그대로 둡니다.
|
|
5
|
+
//
|
|
6
|
+
// 이 프로젝트에만 해당하는 예외가 필요하면 아래에 이어붙이세요.
|
|
7
|
+
// import review from '@byuckchon-frontend/settings/eslint/review';
|
|
8
|
+
// export default [...review, { ignores: ['src/legacy/**'] }];
|
|
9
|
+
export { default } from '@byuckchon-frontend/settings/eslint/review';
|