Skip to content

Commit

Permalink
feat: add local pre commit checks (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
bompo authored Nov 27, 2024
1 parent df5ba22 commit 4527fc2
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[Storybook Link](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/${{ github.head_ref | replace('/', '-') }})
[Storybook Link](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/overview.html)
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ jobs:
with:
name: build-artifacts
path: dist/
- name: Install dependencies
run: npm clean-install
- name: Configure npm authentication
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Fetch latest release version
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run tsc
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"option": "watch",
"problemMatcher": ["$tsc-watch"],
"group": "build",
"label": "tsc: watch - tsconfig.json",
"runOptions": {
"runOn": "folderOpen"
}
}
]
}
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"ci:test:server": "http-server storybook-static --port 9009 --silent",
"ci:test:runner": "wait-on tcp:127.0.0.1:9009 && test-storybook --url http://127.0.0.1:9009 --index-json --browsers chromium",
"build": "rimraf dist && vite build && tsc --declaration --emitDeclarationOnly",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"prepare": "husky"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -70,6 +71,7 @@
"add": "^2.0.6",
"glob": "^11.0.0",
"http-server": "^14.1.1",
"husky": "^9.1.7",
"jest-simple-dot-reporter": "^1.0.5",
"jest-summary-reporter": "^0.0.2",
"nodemon": "^3.1.7",
Expand Down
17 changes: 5 additions & 12 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
// https://github.com/pmndrs/drei/blob/master/tsconfig.json
"compilerOptions": {
"target": "es6",
"lib": [
"es2019",
"dom"
],
"lib": ["es2019", "dom"],
"outDir": "dist",
"rootDir": "src",
"module": "preserve",
Expand All @@ -21,15 +18,11 @@
"declarationMap": true,
"verbatimModuleSyntax": true,
// Stops vscode from sometimes deleting chunks of code accidentally
"allowUnreachableCode": true,
"allowUnreachableCode": true
},
"mdx": {
"checkMdx": true
},
"include": [
"src/"
],
"exclude": [
"node_modules"
]
}
"include": ["src/"],
"exclude": ["node_modules"]
}

0 comments on commit 4527fc2

Please sign in to comment.