fix husky

This commit is contained in:
Mentor
2023-02-08 22:38:43 +01:00
parent 64de055bf6
commit 4aba2a0fee
5 changed files with 28 additions and 12 deletions

6
app/.eslintrc.js Normal file
View File

@@ -0,0 +1,6 @@
const { eslint_config } = require('@poap/skunk-linter')
// Export the default eslint config
module.exports = {
...eslint_config
}

View File

@@ -1,9 +0,0 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 99
versioning-strategy: increase

View File

@@ -5,7 +5,7 @@ echo "\n🤖 [ precommit hook ] linting before committing..."
# If errors, make it clear they cannot commit
if ! lint_outcome=$( npm run lint ); then
if ! lint_outcome=$( cd app && npm run lint ); then
echo "🚨 [ precommit hook ] lint encountered blocking issues, fix them before committing\n"
echo "$lint_outcome"
exit 1
@@ -18,4 +18,4 @@ if echo $lint_outcome | grep -q "warning"; then
exit 0
fi
echo "✅ [ precommit hook ] lint encountered no blocking issues\n"undefined
echo "✅ [ precommit hook ] lint encountered no blocking issues\n"

19
app/.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,19 @@
{
"i18n-ally.localesPaths": [
"public/locales"
],
"i18n-ally.keystyle": "nested",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.renderWhitespace": "all",
"editor.formatOnSave": true,
"eslint.format.enable": true,
"eslint.run": "onType"
}

View File

@@ -24,7 +24,7 @@
"scripts": {
"start": "development=true electron .",
"build": "rm -rf ./dist/* && electron-builder build --mac --arm64",
"prepare": "husky install",
"prepare": "cd .. && husky install ./app/.husky",
"lint": "eslint --fix modules main.js"
},
"repository": "https://github.com/actuallymentor/battery",