Skip to content

Commit

Permalink
problem: code formating is not standarised across dev environmetns (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
bob2402 authored Sep 4, 2024
1 parent f3de87a commit b62722a
Show file tree
Hide file tree
Showing 5 changed files with 312 additions and 48 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
6 changes: 6 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"*.{js,ts,svelte,css,scss,postcss,md,json}": [
"prettier --write --plugin-search-dir=.",
"prettier --check --plugin-search-dir=."
],
}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "eslint .",
"test:integration": "playwright test",
"test:unit": "vitest"
"test:unit": "vitest",
"format": "prettier --write .",
"prepare": "husky"
},
"dependencies": {
"@nostr-dev-kit/ndk": "^2.7.1",
Expand Down Expand Up @@ -58,9 +60,12 @@
"autoprefixer": "^10.4.15",
"daisyui": "^4.7.2",
"eslint": "^8.56.0",
"husky": "^9.1.5",
"lint-staged": "^15.2.10",
"postcss": "^8.4.29",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.6.6",
"svelte": "^4.2.8",
"svelte-awesome-icons": "^1.2.0",
"svelte-check": "^3.6.2",
Expand All @@ -70,5 +75,6 @@
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vitest": "^1.1.2"
}
},
"packageManager": "[email protected]+sha512.0782093d5ba6c7ad9462081bc1ef0775016a4b4109eca1e1fedcea6f110143af5f50993db36c427d4fa8c62be3920a3224db12da719d246ca19dd9f18048c33c"
}
Loading

0 comments on commit b62722a

Please sign in to comment.