Skip to content

Commit

Permalink
Feat/dependency init (#2)
Browse files Browse the repository at this point in the history
* feat(husky): install husky and create the script

* feat(eslint): install eslint and make the configuration

* chore(package.json): add test fields on package.json
  • Loading branch information
Daniere-Mathieu authored Dec 19, 2023
1 parent 16cd96a commit 8211a0e
Show file tree
Hide file tree
Showing 5 changed files with 1,535 additions and 194 deletions.
23 changes: 23 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
root: true,
env: {
browser: true,
es6: true,
node: true,
},
parserOptions: {
sourceType: "module",
},
plugins: ["svelte3"],
extends: ["eslint:recommended"],
overrides: [
{
files: ["**/*.svelte"],
processor: "svelte3/svelte3",
},
],
rules: {},
settings: {
"svelte3/ignore-styles": () => true,
},
};
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm run lint
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm run test
18 changes: 17 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@
"type": "module",
"scripts": {
"dev": "vite",
"prepare": "husky install",
"build": "vite build",
"preview": "vite preview",
"lint": "eslint --ext .js,.ts,.svelte src --fix ",
"test": "echo \"Error: no test specified\" && exit 1",
"check": "svelte-check --tsconfig ./tsconfig.json",
"tauri": "tauri"
"tauri": "tauri",
"tauri:build": "tauri build",
"tauri:dev": "tauri dev",
"commit": "git-cz"
},
"dependencies": {
"@tauri-apps/api": "^1.3.0",
Expand All @@ -21,12 +27,22 @@
"@tauri-apps/cli": "^1.3.0",
"@tsconfig/svelte": "^3.0.0",
"@types/node": "^18.7.10",
"commitizen": "^4.3.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.56.0",
"eslint-plugin-svelte3": "^4.0.0",
"husky": "^8.0.3",
"svelte": "^3.54.0",
"svelte-check": "^3.0.0",
"svelte-preprocess": "^5.0.0",
"svelte-routing": "^1.8.9",
"tslib": "^2.4.1",
"typescript": "^4.9.5",
"vite": "^4.2.1"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Loading

0 comments on commit 8211a0e

Please sign in to comment.