From 5786dc7518fe724acfa59d315cab711b2b01e153 Mon Sep 17 00:00:00 2001 From: wakamsha Date: Sat, 8 Feb 2025 16:07:38 +0900 Subject: [PATCH] fix fix fix --- .github/CONTRIBUTING.md | 10 +++---- .github/workflows/test.yml | 4 +-- .../tests/snapshot-test/README.md | 4 +-- packages/release-config/index.js | 26 ++++++++++++++++++- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 29437357..05ab4dac 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -13,22 +13,22 @@ I appreciate your considering contributing `eslint-config-moneyforward`. This do 1. Fork this repository and clone it locally ```bash - git clone https://github.com/your-username/eslint-config-moneyforward.git + git clone https://github.com/your-username/frontend-tools.git ``` 2. Move to the directory and install dependencies ```bash - cd eslint-config-moneyforward - npm install + cd frontend-tools + pnpm install ``` ### Development The main scripts used during development are: -- `npm run lint`: Runs lint on your code. -- `npm run test`: Runs unit tests. +- `pnpm lint`: Runs lint on your code. +- `pnpm test`: Runs unit tests. ## How to Contribute diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d3e30ee6..2e773bf8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: uses: ./.github/actions/restore-node - name: Run Lint - run: npm -r lint + run: pnpm -r lint - name: Run Test - run: npm -r test + run: pnpm -r test diff --git a/packages/eslint-config/tests/snapshot-test/README.md b/packages/eslint-config/tests/snapshot-test/README.md index b16a4503..64216b34 100644 --- a/packages/eslint-config/tests/snapshot-test/README.md +++ b/packages/eslint-config/tests/snapshot-test/README.md @@ -7,13 +7,13 @@ In the context of ESLint, we use snapshot testing to ensure that our configurati To run the snapshot test, use the following command: ```bash -npm run test +pnpm test ``` If the test fails, and the changes to the ESLint configuration are intentional, you can update the snapshot using the following command: ```bash -npm run test -- -u +pnpm test -- -u ``` This will update the snapshot to match the current configuration. The updated snapshot should then be committed along with the changes to the ESLint configuration. diff --git a/packages/release-config/index.js b/packages/release-config/index.js index 3b073074..5ad22f7f 100644 --- a/packages/release-config/index.js +++ b/packages/release-config/index.js @@ -18,6 +18,30 @@ module.exports = { '@semantic-release/release-notes-generator', { preset: 'conventionalcommits', + + // Override the conventional-changelog preset to accommodate the `releaseRules` you added to the `@semantic-release/commit-analyzer` plugin options. + // see: https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.2.0/README.md#types + presetConfig: { + // origin preset: https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-conventionalcommits/src/constants.js + types: [ + { type: 'feat', section: 'Features' }, + { type: 'feature', section: 'Features' }, + { type: 'fix', section: 'Bug Fixes' }, + { type: 'perf', section: 'Performance Improvements' }, + { type: 'revert', section: 'Reverts' }, + + // Override the configuration to include `docs` type in the release notes. + { type: 'docs', scope: 'README', section: 'Documentation' }, + { type: 'docs', scope: 'LICENSE', section: 'Documentation' }, + + { type: 'style', section: 'Styles', hidden: true }, + { type: 'chore', section: 'Miscellaneous Chores', hidden: true }, + { type: 'refactor', section: 'Code Refactoring', hidden: true }, + { type: 'test', section: 'Tests', hidden: true }, + { type: 'build', section: 'Build System', hidden: true }, + { type: 'ci', section: 'Continuous Integration', hidden: true }, + ], + }, }, ], '@semantic-release/changelog', @@ -25,7 +49,7 @@ module.exports = { [ '@semantic-release/git', { - assets: ['CHANGELOG.md', 'package.json', 'package-lock.json'], + assets: ['CHANGELOG.md', 'package.json'], }, ], '@semantic-release/github',