Skip to content

Commit

Permalink
build: add ci config that runs trunk check
Browse files Browse the repository at this point in the history
  • Loading branch information
chapati23 committed Jul 23, 2024
1 parent 4e037de commit 47b4356
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 69 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Trunk Check
on: [push]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions: read-all

jobs:
trunk-check:
runs-on: ubuntu-latest
permissions:
checks: write # For trunk to post annotations
contents: read # For repo checkout
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- uses: trunk-io/trunk-action@v1
with:
check-mode: all
5 changes: 4 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ export default tseslint.config(
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
ignores: ["commitlint.config.mjs", "eslint.config.mjs"],
files: ["**/*.mjs"],
extends: [tseslint.configs.disableTypeChecked],
},
{
languageOptions: {
parserOptions: {
project: true,
Expand Down
158 changes: 95 additions & 63 deletions package-lock.json

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

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
"viem": "^2.17.0"
},
"devDependencies": {
"@eslint/js": "^9.6.0",
"@eslint/js": "^9.7.0",
"@trunkio/launcher": "^1.3.1",
"eslint": "9.x",
"@types/eslint__js": "^8.42.3",
"eslint": "^9.7.0",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.0-alpha.39"
"typescript-eslint": "^8.0.0-alpha.51"
}
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"include": ["src/**/*"],
"include": ["src/**/*", "eslint.config.mjs", "commitlint.config.mjs"],
"exclude": ["node_modules"],
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
Expand Down Expand Up @@ -46,7 +46,7 @@
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */

/* JavaScript Support */
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */

Expand Down

0 comments on commit 47b4356

Please sign in to comment.