Skip to content

Commit

Permalink
chore: add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
AriTheElk committed Dec 15, 2024
1 parent f239c85 commit 942f6a0
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"@typescript-eslint",
"import"
],
"ignorePatterns": [
"node_modules/",
"dist/"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/lint.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Lint

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: lint
29 changes: 29 additions & 0 deletions .github/workflows/typecheck.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Typecheck

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: typecheck
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"description": "Easily find any image inside your vault",
"main": "dist/main.js",
"scripts": {
"typecheck": "tsc --noEmit",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
"ci": "npm run typecheck && npm run lint",
"dev": "node esbuild.config.mjs",
"prebuild": "rimraf dist",
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@
"include": [
"**/*.ts",
"src/main.tsx"
],
"ignore": [
"node_modules",
"dist"
]
}

0 comments on commit 942f6a0

Please sign in to comment.