Skip to content

Commit

Permalink
Add prettier formatting with husky hooks (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadofer committed Feb 18, 2023
1 parent 36fadfe commit dafd717
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run format
43 changes: 43 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion package.json
Expand Up @@ -6,13 +6,19 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"preview": "vite preview",
"format": "prettier --plugin-search-dir=. --write .",
"format:check": "prettier --check .",
"prepare": "husky install"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.0.2",
"autoprefixer": "^10.4.13",
"fluent-svelte": "^1.6.0",
"husky": "^8.0.3",
"postcss": "^8.4.20",
"prettier": "^2.8.4",
"prettier-plugin-svelte": "^2.9.0",
"sass": "^1.57.1",
"svelte": "^3.55.0",
"svelte-preprocess": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/apps/Settings.svelte
Expand Up @@ -22,7 +22,7 @@
}}
transition:scale={{ duration: 200 }}
>
<Titlebar appName="Settings" canGoBack={ true } />
<Titlebar appName="Settings" canGoBack={true} />
<div class="mainApp">
{#each Object.entries(data) as [i]}
{#if tab === i}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Widgets.svelte
Expand Up @@ -4,7 +4,9 @@
import { date } from "../store";
const getNews = (async () => {
const res = await fetch("https://github.win11react.com/api-cache/news.json");
const res = await fetch(
"https://github.win11react.com/api-cache/news.json"
);
return await res.json();
})();
</script>
Expand Down

1 comment on commit dafd717

@vercel
Copy link

@vercel vercel bot commented on dafd717 Feb 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

win11-svelte – ./

win11-svelte-git-main-yashash.vercel.app
win11-svelte.vercel.app
win11-svelte-yashash.vercel.app

Please sign in to comment.