Skip to content

Commit

Permalink
Add lint action
Browse files Browse the repository at this point in the history
  • Loading branch information
imaandrew committed Jul 18, 2023
1 parent af2c635 commit 2856aae
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint

on:
push:
branches:
- main
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: "yarn"

- name: Install Dependencies
run: yarn install --immutable

- name: Lint ESLint
run: yarn lint:eslint

- name: Lint Prettier
run: yarn lint:prettier

- name: Lint Svelte
run: yarn lint:svelte
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"lint": "yarn eslint src",
"lint:fix": "yarn run lint --fix",
"pretty": "yarn prettier src --check",
"pretty:fix": "yarn run pretty --write",
"format": "yarn run pretty:fix && yarn run lint:fix"
"lint": "yarn lint:eslint && yarn lint:prettier && yarn lint:svelte",
"lint:eslint": "yarn eslint src",
"lint:prettier": "yarn prettier src --check",
"lint:svelte": "svelte-check --tsconfig ./tsconfig.json",
"fix": "yarn fix:prettier && yarn fix:eslint",
"fix:eslint": "yarn lint:eslint --fix",
"fix:prettier": "yarn lint:prettier --write"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.2",
Expand Down

0 comments on commit 2856aae

Please sign in to comment.