-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d011032
commit 9988ad5
Showing
49 changed files
with
18,072 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: "2" | ||
checks: | ||
argument-count: | ||
config: | ||
threshold: 4 | ||
complex-logic: | ||
config: | ||
threshold: 4 | ||
file-lines: | ||
config: | ||
threshold: 500 | ||
method-complexity: | ||
config: | ||
threshold: 5 | ||
method-count: | ||
config: | ||
threshold: 30 | ||
method-lines: | ||
config: | ||
threshold: 100 | ||
nested-control-flow: | ||
config: | ||
threshold: 4 | ||
return-statements: | ||
config: | ||
threshold: 4 | ||
identical-code: | ||
config: | ||
threshold: 80 | ||
similar-code: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build/ | ||
dist/ | ||
node_modules/ | ||
.snapshots/ | ||
*.min.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Workaround for https://github.com/eslint/eslint/issues/3458 | ||
require('@rushstack/eslint-patch/modern-module-resolution'); | ||
|
||
module.exports = { | ||
root: true, | ||
plugins: ['@croct'], | ||
extends: [ | ||
'plugin:@croct/react', | ||
'plugin:@croct/typescript', | ||
], | ||
parserOptions: { | ||
project: ['./tsconfig.json'], | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
jest: { | ||
version: 'detect', | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: "🐞 Bug report" | ||
about: "Create a report to help us improve" | ||
labels: bug | ||
--- | ||
|
||
## 🐞 Bug report | ||
Please describe the problem you are experiencing. | ||
|
||
### Steps to reproduce | ||
Please provide a minimal code snippet and the detailed steps for reproducing the issue. | ||
|
||
1. Step 1 | ||
2. Step 2 | ||
3. Step 3 | ||
|
||
### Expected behavior | ||
Please describe the behavior you are expecting. | ||
|
||
### Screenshots | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
### Additional context | ||
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: "✨ Feature request" | ||
about: "Suggest an idea for this project" | ||
labels: enhancement | ||
--- | ||
|
||
## ✨ Feature request | ||
Please provide a brief explanation of the feature. | ||
|
||
### Motivation | ||
Please share the motivation for the new feature, and what problem it is solving. | ||
|
||
### Example | ||
If the proposal involves a new or changed API, please include a basic code example. | ||
|
||
### Alternatives | ||
Please describe the alternative solutions or features you've considered. | ||
|
||
### Additional context | ||
Please provide any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Summary | ||
Please include a summary of the change and which issue is addressed. | ||
|
||
- Fixes #(issue 1) | ||
- Fixes #(issue 2) | ||
- Fixes #(issue 3) | ||
|
||
### Checklist | ||
|
||
- [ ] My code follows the style guidelines of this project | ||
- [ ] I have performed a self-review of my own code | ||
- [ ] I have commented my code, particularly in hard-to-understand areas | ||
- [ ] I have made corresponding changes to the documentation | ||
- [ ] My changes generate no new warnings | ||
- [ ] I have added tests that prove my fix is effective or that my feature works | ||
- [ ] New and existing unit tests pass locally with my changes | ||
- [ ] Any dependent changes have been merged and published in downstream modules | ||
- [ ] I have checked my code and corrected any misspellings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name-template: '$NEXT_PATCH_VERSION' | ||
tag-template: '$NEXT_PATCH_VERSION' | ||
prerelease: true | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- feature | ||
- title: '🔧 Enhancements' | ||
labels: | ||
- enhancement | ||
- title: '🐞 Bug Fixes' | ||
labels: | ||
- bug | ||
- title: '🚧 Maintenance' | ||
labels: | ||
- maintenance | ||
change-template: '- $TITLE (#$NUMBER), thanks [$AUTHOR](https://github.com/$AUTHOR)!' | ||
sort-by: merged_at | ||
sort-direction: descending | ||
branches: | ||
- master | ||
exclude-labels: | ||
- wontfix | ||
- duplicate | ||
- invalid | ||
- question | ||
no-changes-template: 'This release contains minor changes and bugfixes.' | ||
template: |- | ||
## What's Changed | ||
$CHANGES | ||
🎉 **Thanks to all contributors helping with this release:** | ||
$CONTRIBUTORS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Validations | ||
|
||
on: | ||
push: | ||
tags-ignore: | ||
- '**' | ||
branches: | ||
- master | ||
pull_request: | ||
types: | ||
- synchronize | ||
- opened | ||
|
||
jobs: | ||
security-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Check dependency vulnerabilities | ||
run: |- | ||
npm audit --omit=dev | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Check compilation errors | ||
run: npm run validate | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- validate | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Check coding standard violations | ||
run: npm run lint | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- validate | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: npm test | ||
coverageLocations: | ||
./coverage/lcov.info:lcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Label requirements | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
check-labels: | ||
name: Check labels | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: docker://agilepathway/pull-request-label-checker:latest | ||
with: | ||
any_of: maintenance,feature,bug,enhancement | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: |- | ||
npm ci | ||
rm -rf ~/.npmrc | ||
- name: Build package | ||
run: npm run build | ||
|
||
- name: Prepare release | ||
run: |- | ||
cp package.json LICENSE README.md build/ | ||
cd build | ||
find . -type f -path '*/*\.js.map' -exec sed -i -e "s~../src~src~" {} + | ||
sed -i -e "s~\"version\": \"0.0.0-dev\"~\"version\": \"${GITHUB_REF##*/}\"~" package.json | ||
sed -i -e "s~\./build~.~" package.json | ||
sed -i -e "s~./src~.~" package.json | ||
cp -r ../src src | ||
- name: Publish pre-release to NPM | ||
if: ${{ github.event.release.prerelease }} | ||
run: |- | ||
cd build | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc | ||
npm publish --access public --tag next | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Publish release to NPM | ||
if: ${{ !github.event.release.prerelease }} | ||
run: |- | ||
cd build | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc | ||
npm publish --access public | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags-ignore: | ||
- '**' | ||
|
||
jobs: | ||
release-draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Update release draft | ||
uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
coverage/ | ||
node_modules/ | ||
build/ |
Oops, something went wrong.