Skip to content

Commit

Permalink
Add lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Oct 20, 2023
1 parent 26c9a06 commit d7f661f
Show file tree
Hide file tree
Showing 8 changed files with 278 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ jobs:
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
continue-on-error: true

# - name: Chrome upload & release
# uses: Klemensas/chrome-extension-upload-action@$VERSION
# with:
# refresh-token: 'xxxxxxxxxxxxxxxxxxxxxx'
# client-id: 'xxxxxxxxxxxxx'
# client-secret: 'xxxxxxxxxxxx'
# file-name: './extension.zip'
# app-id: 'xzc12xzc21cx23'
# publish: true

- name: Edge upload & release
uses: wdzeng/[email protected]
with:
Expand Down
3 changes: 1 addition & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint && pnpm format
npx lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{js,ts,svelte,css,scss,postcss,md,json}": ["eslint", "prettier --write --plugin-search-dir=."]
}
7 changes: 6 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
"overrides": [
{
"files": "*.svelte",
"options": { "parser": "svelte" }
}
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0",
"husky": "^8.0.0",
"lint-staged": "^15.0.2",
"postcss": "^8.4.31",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.10.1",
Expand Down
Loading

0 comments on commit d7f661f

Please sign in to comment.