Skip to content

Commit

Permalink
Run lint in CI and precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
damianstasik committed Sep 20, 2023
1 parent fff4699 commit 95ebb2c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
node-version: "18"
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
- name: Build website
run: npm run build
- name: Publish to Cloudflare Pages
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
node-version: "18"
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
- name: Build website
run: npm run build
- name: Setup Pages
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
.env.development.local
.env.test.local
.env.production.local
.eslintcache

npm-debug.log*
yarn-debug.log*
Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc",
"sync-supporters": "node ./sync-supporters.js",
"prepare": "husky install"
"prepare": "husky install",
"lint": "eslint --cache \"**/*.{js,jsx,ts,tsx}\""
},
"dependencies": {
"@docusaurus/core": "2.4.1",
Expand Down Expand Up @@ -63,6 +59,6 @@
"eslint-plugin-react-hooks": "^4.6.0"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
"**/*": ["prettier --write --ignore-unknown", "npm run lint"]
}
}

0 comments on commit 95ebb2c

Please sign in to comment.