-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: pre-commit checks and ci (#3)
* chore(repo): setup pre-commit checks * chore(repo): setup github CI * chore(repo): fix lint and pnpm * chore(repo): fix branch name
- Loading branch information
1 parent
654aef5
commit 3626b33
Showing
12 changed files
with
9,603 additions
and
3,006 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,15 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'scope-enum': [ | ||
2, | ||
'always', | ||
[ | ||
'qwik-angular', | ||
'add-angular-to-qwik', | ||
'repo', // anything related to managing the repo itself | ||
], | ||
], | ||
'scope-empty': [2, 'never'], | ||
}, | ||
}; |
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,36 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
# Needed for nx-set-shas within nx-cloud-main.yml, when run on the main branch | ||
permissions: | ||
actions: read | ||
contents: read | ||
|
||
jobs: | ||
main: | ||
name: Nx Cloud - Main Job | ||
uses: nrwl/ci/.github/workflows/[email protected] | ||
with: | ||
working-directory: '.' | ||
main-branch-name: master | ||
number-of-agents: 3 | ||
init-commands: | | ||
pnpm exec nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3 | ||
parallel-commands: | | ||
pnpm exec nx-cloud record -- pnpm exec nx format:check | ||
parallel-commands-on-agents: | | ||
pnpm exec nx affected --target=lint --parallel=3 | ||
pnpm exec nx affected --target=test --parallel=3 --ci --code-coverage | ||
pnpm exec nx affected --target=build --parallel=3 | ||
agents: | ||
name: Nx Cloud - Agents | ||
uses: nrwl/ci/.github/workflows/[email protected] | ||
with: | ||
number-of-agents: 3 | ||
working-directory: '.' |
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 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm exec commitlint --edit $1 |
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" | ||
|
||
pnpm exec lint-staged |
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,10 @@ | ||
import { relative } from 'path'; | ||
import { workspaceRoot } from '@nx/devkit'; | ||
|
||
export default { | ||
'**/*': (files) => | ||
`pnpx nx format:write --files=${files | ||
.map((f) => relative(workspaceRoot, f)) | ||
.join(',')}`, | ||
'{apps,libs,packages,tools}/**/*.{ts,tsx,js,jsx}': 'eslint', | ||
}; |
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 |
---|---|---|
|
@@ -2,12 +2,19 @@ | |
"name": "@qwik-angular/source", | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"scripts": {}, | ||
"scripts": { | ||
"prepare": "husky install" | ||
}, | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"pnpm": "^8.0.0" | ||
}, | ||
"devDependencies": { | ||
"@builder.io/qwik": "~1.2.6", | ||
"@builder.io/qwik-city": "~1.2.6", | ||
"@nx/angular": "17.1.1", | ||
"@nx/devkit": "17.1.1", | ||
"@nx/eslint-plugin": "17.1.1", | ||
"@nx/js": "17.1.1", | ||
"@nx/vite": "17.1.1", | ||
|
@@ -37,7 +44,11 @@ | |
"vite-tsconfig-paths": "~4.2.0", | ||
"vitest": "~0.32.0", | ||
"yargs": "^17.7.2", | ||
"@nx/eslint": "17.1.1" | ||
"@nx/eslint": "17.1.1", | ||
"husky": "^8.0.0", | ||
"@commitlint/cli": "^17.6.5", | ||
"@commitlint/config-conventional": "^17.6.5", | ||
"lint-staged": "^13.2.2" | ||
}, | ||
"nx": { | ||
"includedScripts": [] | ||
|
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
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
Oops, something went wrong.