diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..36721cf
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,15 @@
+# Pull Request Template
+
+## Description
+
+
+## Checklist
+
+
+- [ ] **Tests**: I have created multiple test case scenarios for my changes.
+- [ ] **Passing Tests**: All existing and new tests are passing.
+- [ ] **Version Bump**: I have increased the package version number in `package.json` following the [Semantic Versioning](https://semver.org/) (SEMVER) standard.
+- [ ] **Focused Changes**: My code changes are focused solely on the matter described above.
+
+## Additional Information
+
diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml
index 31f87d3..48e5f26 100644
--- a/.github/workflows/pullRequest.yml
+++ b/.github/workflows/pullRequest.yml
@@ -9,6 +9,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
- name: Use Node.js 18.x
uses: actions/setup-node@v3
@@ -39,6 +41,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
- name: Use Node.js 18.x
uses: actions/setup-node@v3
@@ -70,6 +74,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
- name: Use Node.js 18.x
uses: actions/setup-node@v3
@@ -95,6 +101,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
- name: Use Node.js 18.x
uses: actions/setup-node@v3
@@ -112,3 +120,47 @@ jobs:
- name: Find dead code
run: yarn deadCode
+
+ version-check:
+ name: Check package version
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout PR
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+
+ - name: Checkout main
+ uses: actions/checkout@v3
+ with:
+ ref: main
+ path: main
+ fetch-depth: 1
+
+ - name: Compare versions
+ id: version_check
+ run: |
+ PR_VERSION=$(node -p "require('./package.json').version")
+ MAIN_VERSION=$(node -p "require('./main/package.json').version")
+ if [ "$PR_VERSION" = "$MAIN_VERSION" ]; then
+ echo "ERROR_MESSAGE=Error: Package version has not been updated" >> $GITHUB_OUTPUT
+ exit 1
+ elif ! npx semver -r ">$MAIN_VERSION" "$PR_VERSION" > /dev/null; then
+ echo "ERROR_MESSAGE=Error: New version ($PR_VERSION) is not greater than current version ($MAIN_VERSION)" >> $GITHUB_OUTPUT
+ exit 1
+ else
+ echo "Package version has been updated correctly"
+ fi
+
+ - name: Comment PR
+ if: failure()
+ uses: actions/github-script@v6
+ with:
+ github-token: ${{secrets.GITHUB_TOKEN}}
+ script: |
+ github.rest.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: '${{ steps.version_check.outputs.ERROR_MESSAGE }}'
+ })
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 72ef5a1..16307e2 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -11,6 +11,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
- name: Use Node.js 16.x
uses: actions/setup-node@v3
@@ -41,6 +43,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
- name: Use Node.js 16.x
uses: actions/setup-node@v3
@@ -72,6 +76,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
- name: Use Node.js 16.x
uses: actions/setup-node@v3
@@ -97,6 +103,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
- name: Use Node.js 16.x
uses: actions/setup-node@v3
@@ -122,6 +130,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
- name: Use Node.js 16.x
uses: actions/setup-node@v3
@@ -148,4 +158,3 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_command: npm publish --access public
generate_release_notes: true
-
diff --git a/__tests__/require-usememo.test.ts b/__tests__/require-usememo.test.ts
index 1b0bc7b..6b27a02 100644
--- a/__tests__/require-usememo.test.ts
+++ b/__tests__/require-usememo.test.ts
@@ -327,6 +327,33 @@ describe('Rule - Require-usememo', () => {
return {x, y};
}`,
},
+ // ignoredPropNames
+ {
+ code: `const Component = () => {
+ const myObject = {};
+ return