-
Notifications
You must be signed in to change notification settings - Fork 44
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
Showing
39 changed files
with
2,156 additions
and
1,035 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 |
---|---|---|
@@ -1,13 +1,53 @@ | ||
{ | ||
"plugins": ["prettier"], | ||
"extends": ["airbnb-base", "plugin:storybook/recommended", "prettier"], | ||
"env": { | ||
"browser": true | ||
}, | ||
"plugins": ["only-warn"], | ||
"settings": { | ||
"import/resolver": { | ||
"node": true, | ||
"jsconfig": { | ||
"config": "jsconfig.json" | ||
} | ||
} | ||
}, | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"no-console": "warn", | ||
"no-console": [ | ||
"warn", | ||
{ | ||
"allow": ["warn"] | ||
} | ||
], | ||
"object-curly-newline": "off", | ||
"import/prefer-default-export": "off" | ||
} | ||
}, | ||
"overrides": [ | ||
{ | ||
"env": { | ||
"node": true, | ||
"jest": true | ||
}, | ||
"plugins": ["vitest", "testing-library"], | ||
"files": ["**/*.spec.js", "**/*.test.js"], | ||
"extends": [ | ||
"plugin:testing-library/dom", | ||
"plugin:vitest/recommended", | ||
"plugin:vitest-globals/recommended" | ||
], | ||
"rules": { | ||
"testing-library/prefer-user-event": ["warn"], | ||
"no-restricted-syntax": [ | ||
"warn", | ||
{ | ||
"message": "Use screen 'methods' imported from '@testing-library/vanilla' instead.", | ||
"selector": "MemberExpression > Identifier[name=\"selected\"]" | ||
} | ||
] | ||
}, | ||
"globals": { | ||
"vi": true | ||
} | ||
} | ||
] | ||
} |
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,27 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: ['main'] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup deps | ||
uses: ./.github/actions/install-deps | ||
|
||
- name: Run unit Tests | ||
run: pnpm vitest --silent --coverage | ||
|
||
- name: 'Report Coverage' | ||
uses: davelosert/vitest-coverage-report-action@v2 | ||
|
||
- name: 'Upload Coverage' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage | ||
path: coverage |
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 |
---|---|---|
|
@@ -24,3 +24,5 @@ dist-ssr | |
*.sw? | ||
package-lock.json | ||
yarn.lock | ||
|
||
coverage |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm commitlint --edit $1 | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm commitlint --edit $1 |
Empty file.
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
exec < /dev/tty && npx cz --hook || true |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"*.js": ["eslint --fix", "prettier --write"], | ||
"*.js": ["eslint --max-warnings=0 --fix ", "prettier --write"], | ||
"*.scss": ["stylelint --fix", "prettier --write"] | ||
} |
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
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,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"types": ["vitest/globals"], | ||
"baseUrl": ".", | ||
"paths": { | ||
"@testing-library/vanilla": ["src/__tests__/index.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
Oops, something went wrong.