improve prettier support, add pre-commmit hook

pull/204/head
robinmoisson 2024-09-27 16:25:45 +02:00
rodzic 3dd49f054b
commit 70c11b4036
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 05C05FC1814FBF27
5 zmienionych plików z 1881 dodań i 398 usunięć

Wyświetl plik

@ -0,0 +1 @@
npx lint-staged

4
.prettierignore 100644
Wyświetl plik

@ -0,0 +1,4 @@
node_modules
example/encrypted
package-lock.json
index.html

Wyświetl plik

@ -1,15 +1,15 @@
{ {
"printWidth": 120, "printWidth": 120,
"semi": true, "semi": true,
"singleQuote": false, "singleQuote": false,
"tabWidth": 4, "tabWidth": 4,
"trailingComma": "es5", "trailingComma": "es5",
"overrides": [ "overrides": [
{ {
"files": "*.{js,html}", "files": "*.{js,html}",
"options": { "options": {
"proseWrap": "preserve" "proseWrap": "preserve"
} }
} }
] ]
} }

2135
package-lock.json wygenerowano

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,54 +1,63 @@
{ {
"name": "staticrypt", "name": "staticrypt",
"version": "3.5.0", "version": "3.5.0",
"description": "Password protect a static HTML file without a backend - StatiCrypt uses AES-256 wiht WebCrypto to encrypt your input with your long password and put it in a HTML file with a password prompt that can decrypted in-browser (client side).", "description": "Password protect a static HTML file without a backend - StatiCrypt uses AES-256 wiht WebCrypto to encrypt your input with your long password and put it in a HTML file with a password prompt that can decrypted in-browser (client side).",
"main": "index.js", "main": "index.js",
"files": [ "files": [
"/cli", "/cli",
"/lib" "/lib"
], ],
"bin": { "bin": {
"staticrypt": "./cli/index.js" "staticrypt": "./cli/index.js"
}, },
"dependencies": { "dependencies": {
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"yargs": ">=10.0.3" "yargs": ">=10.0.3"
}, },
"engines": { "engines": {
"node": ">=16.0.0" "node": ">=16.0.0"
}, },
"funding": { "funding": {
"type": "github", "type": "github",
"url": "https://github.com/robinmoisson/staticrypt?sponsor=1" "url": "https://github.com/robinmoisson/staticrypt?sponsor=1"
}, },
"author": "Robin Moisson (https://github.com/robinmoisson)", "author": "Robin Moisson (https://github.com/robinmoisson)",
"contributors": [ "contributors": [
"Aaron Coplan (https://github.com/AaronCoplan)", "Aaron Coplan (https://github.com/AaronCoplan)",
"Adam Hull (https://github.com/hurrymaplelad)" "Adam Hull (https://github.com/hurrymaplelad)"
], ],
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build": "bash ./scripts/build.sh" "build": "bash ./scripts/build.sh",
}, "format": "prettier --write \"**/*.{js,json,html}\"",
"repository": { "prepare": "husky"
"type": "git", },
"url": "git+https://github.com/robinmoisson/staticrypt.git" "lint-staged": {
}, "**/*.{js,json,html}": [
"keywords": [ "prettier --write"
"static", ]
"html", },
"password", "repository": {
"protected", "type": "git",
"encrypted", "url": "git+https://github.com/robinmoisson/staticrypt.git"
"encryption", },
"crypto", "keywords": [
"webcrypto" "static",
], "html",
"bugs": { "password",
"url": "https://github.com/robinmoisson/staticrypt/issues" "protected",
}, "encrypted",
"homepage": "https://github.com/robinmoisson/staticrypt", "encryption",
"devDependencies": { "crypto",
"prettier": "^2.8.7" "webcrypto"
} ],
"bugs": {
"url": "https://github.com/robinmoisson/staticrypt/issues"
},
"homepage": "https://github.com/robinmoisson/staticrypt",
"devDependencies": {
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"prettier": "^2.8.8"
}
} }