diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..610c2a54 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm test diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..dc3f9d59 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,44 @@ +# Virtual environment +.venv/ + +# sphinx build folder +build/ + +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store? +ehthumbs.db +Icon? +Thumbs.db + +# Editor backup files # +####################### +*~ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 78506f18..8b325e47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -93,6 +93,7 @@ "eslint-plugin-css-import-order": "^1.1.0", "eslint-plugin-import": "^2.26.0", "fork-ts-checker-webpack-plugin": "^7.2.13", + "husky": "^8.0.3", "jest": "^29.6.1", "jest-environment-jsdom": "^29.6.2", "json-loader": "^0.5.7", @@ -14154,6 +14155,21 @@ "ms": "^2.0.0" } }, + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/iconv-corefoundation": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz", diff --git a/package.json b/package.json index df40ec07..18dc6d38 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "lint": "eslint --ext .ts,.tsx .", "test": "jest", "test:watch": "jest --watch", - "test:coverage": "jest --coverage" + "test:coverage": "jest --coverage", + "prepare": "husky install" }, "devDependencies": { "@electron-forge/cli": "^6.1.1", @@ -65,6 +66,7 @@ "eslint-plugin-css-import-order": "^1.1.0", "eslint-plugin-import": "^2.26.0", "fork-ts-checker-webpack-plugin": "^7.2.13", + "husky": "^8.0.3", "jest": "^29.6.1", "jest-environment-jsdom": "^29.6.2", "json-loader": "^0.5.7",