Setup Prettier

pull/1/head
Damien Erambert 2022-07-31 21:51:51 +02:00
parent c56fbd5bc8
commit 8821729b90
No known key found for this signature in database
GPG Key ID: 519179F777AE5A0F
6 changed files with 1774 additions and 5 deletions

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged

12
.prettierrc.json Normal file
View File

@ -0,0 +1,12 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid",
"rangeStart": 0
}

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}

3
lint-staged.config.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
"*.{js,md,json}": "prettier --write"
};

1745
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,9 @@
"version": "0.0.2", "version": "0.0.2",
"description": "Unofficial API for cohost.org", "description": "Unofficial API for cohost.org",
"main": "lib.js", "main": "lib.js",
"scripts": {}, "scripts": {
"prepare": "husky install"
},
"keywords": [ "keywords": [
"cohost" "cohost"
], ],
@ -15,7 +17,6 @@
"directories": { "directories": {
"lib": "lib" "lib": "lib"
}, },
"devDependencies": {},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/mogery/cohost.js.git" "url": "git+https://github.com/mogery/cohost.js.git"
@ -23,5 +24,10 @@
"bugs": { "bugs": {
"url": "https://github.com/mogery/cohost.js/issues" "url": "https://github.com/mogery/cohost.js/issues"
}, },
"homepage": "https://github.com/mogery/cohost.js#readme" "homepage": "https://github.com/mogery/cohost.js#readme",
"devDependencies": {
"husky": "^7.0.0",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1"
}
} }