-
-
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.
chore: Improved prettier, eslint and vitest config and stuff
- Loading branch information
Showing
22 changed files
with
54 additions
and
78 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 |
---|---|---|
|
@@ -18,15 +18,12 @@ jobs: | |
uses: spuxx1701/ci-cd/.github/workflows/[email protected] | ||
needs: | ||
- install_deps | ||
with: | ||
PNPM_FLAGS: --recursive | ||
|
||
run_unit_tests: | ||
name: Run unit tests | ||
uses: spuxx1701/ci-cd/.github/workflows/[email protected] | ||
needs: | ||
- install_deps | ||
with: | ||
PNPM_FLAGS: --recursive | ||
COVERAGE_FILENAME: reports/vitest/coverage/cobertura-coverage.xml | ||
COVERAGE_FAIL_BELOW_MIN: 100 |
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 |
---|---|---|
|
@@ -14,13 +14,13 @@ jobs: | |
name: Run code checks | ||
uses: spuxx1701/ci-cd/.github/workflows/[email protected] | ||
needs: | ||
- install_deps | ||
- install_deps | ||
|
||
run_unit_tests: | ||
name: Run unit tests | ||
uses: spuxx1701/ci-cd/.github/workflows/[email protected] | ||
needs: | ||
- install_deps | ||
- install_deps | ||
with: | ||
COVERAGE_FILENAME: reports/vitest/coverage/cobertura-coverage.xml | ||
COVERAGE_FAIL_BELOW_MIN: 100 |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
workflow_dispatch: | ||
push: | ||
tags: | ||
- v* | ||
- v* | ||
|
||
jobs: | ||
install_deps: | ||
|
@@ -15,13 +15,13 @@ jobs: | |
name: Run code checks | ||
uses: spuxx1701/ci-cd/.github/workflows/[email protected] | ||
needs: | ||
- install_deps | ||
- install_deps | ||
|
||
run_unit_tests: | ||
name: Run unit tests | ||
uses: spuxx1701/ci-cd/.github/workflows/[email protected] | ||
needs: | ||
- install_deps | ||
- install_deps | ||
with: | ||
COVERAGE_FILENAME: reports/vitest/coverage/cobertura-coverage.xml | ||
COVERAGE_FAIL_BELOW_MIN: 100 | ||
|
@@ -30,13 +30,13 @@ jobs: | |
name: Build artifact | ||
uses: spuxx1701/ci-cd/.github/workflows/[email protected] | ||
needs: | ||
- run_checks | ||
- run_unit_tests | ||
- run_checks | ||
- run_unit_tests | ||
|
||
publish: | ||
name: Publish artifact | ||
uses: spuxx1701/ci-cd/.github/workflows/[email protected] | ||
needs: | ||
- build | ||
- build | ||
secrets: | ||
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 |
---|---|---|
|
@@ -13,7 +13,6 @@ dist-ssr | |
*.local | ||
|
||
# Reports | ||
coverage/ | ||
reports/ | ||
pnpm-publish-summary.json | ||
|
||
|
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 +1,4 @@ | ||
pnpm-lock.yaml | ||
pnpm-lock.yaml | ||
reports/ | ||
dist/ | ||
.github/ |
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,5 +1,5 @@ | ||
module.exports ={ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"printWidth": 120 | ||
} | ||
module.exports = { | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
printWidth: 120, | ||
}; |
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,2 +1,3 @@ | ||
# web-libs | ||
|
||
A metarepository containing various libraries I maintain for my typical web stack. |
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 |
---|---|---|
|
@@ -20,6 +20,15 @@ | |
"url": "https://github.com/spuxx1701/web-libs/issues" | ||
}, | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"test": "pnpm run test:unit", | ||
"test:unit": "vitest run --coverage", | ||
"check": "pnpm types && pnpm run lint && pnpm run prettier-check", | ||
"types": "tsc --noEmit", | ||
"lint": "eslint . --ext ts,tsx", | ||
"prettier-check": "prettier --check .", | ||
"format": "prettier --write ." | ||
}, | ||
"devDependencies": { | ||
"typescript": "5.5.4", | ||
"@types/node": "22.0.0", | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
packages: | ||
- 'packages/*' | ||
- 'test-apps/*' | ||
- 'packages/*' | ||
- 'test-apps/*' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
/// <reference types="vitest" /> | ||
import baseConfig from './vite.config'; | ||
import { mergeConfig, defineConfig } from 'vite'; | ||
|
||
export default mergeConfig( | ||
baseConfig, | ||
defineConfig({ | ||
test: { | ||
setupFiles: ['tests/vitest/vitest.setup.ts'], | ||
reporters: ['default', 'junit'], | ||
outputFile: 'reports/junit/junit.xml', | ||
coverage: { | ||
provider: 'v8', | ||
all: true, | ||
include: ['packages/**/*.ts'], | ||
exclude: ['src/main.ts', '**/*types.ts'], | ||
reportsDirectory: 'reports/vitest/coverage', | ||
reporter: ['text', 'cobertura'], | ||
}, | ||
}, | ||
}), | ||
); |