-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds type and lint checks to CI (#903)
Co-authored-by: Daniel Afonso <[email protected]>
- Loading branch information
1 parent
f996fa9
commit faf1ccd
Showing
21 changed files
with
520 additions
and
209 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"ignorePatterns": ["node_modules/", "dist/"], | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:solid/typescript" | ||
], | ||
"overrides": [ | ||
{ | ||
"env": { | ||
"node": true | ||
}, | ||
"files": [".eslintrc.{js,cjs}"], | ||
"parserOptions": { | ||
"sourceType": "script" | ||
} | ||
} | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint", "solid"], | ||
"rules": { | ||
"quotes": ["error", "double"], | ||
"semi": "warn", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"args": "all", | ||
"argsIgnorePattern": "^_", | ||
"caughtErrors": "all", | ||
"caughtErrorsIgnorePattern": "^_", | ||
"destructuredArrayIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_", | ||
"ignoreRestSiblings": 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,71 @@ | ||
name: 🔍 Lint / Type Checks | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: "pnpm" | ||
- run: pnpm i | ||
- uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
node_modules | ||
~/.pnpm-store | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
|
||
typecheck: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: "pnpm" | ||
- uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
node_modules | ||
~/.pnpm-store | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
- name: Generate virtual modules | ||
run: pnpm sync | ||
- name: TypeScript check | ||
run: pnpm check:types | ||
|
||
lint: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: "pnpm" | ||
- uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
node_modules | ||
~/.pnpm-store | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
- name: ESLint check | ||
run: pnpm check:lint |
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.