style: configure prettier
This commit is contained in:
parent
05f12cdc56
commit
fad2041a5e
23
.github/workflows/prettier.yml
vendored
Normal file
23
.github/workflows/prettier.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# From https://til.simonwillison.net/github-actions/prettier-github-actions
|
||||||
|
name: Check JavaScript for conformance with Prettier
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prettier:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Configure npm caching
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-npm-
|
||||||
|
- name: Run prettier
|
||||||
|
run: |-
|
||||||
|
npx prettier --check .
|
5
.prettierignore
Normal file
5
.prettierignore
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
dist
|
||||||
|
coverage
|
||||||
|
|
||||||
|
# semantic-release
|
||||||
|
CHANGELOG.md
|
3
.prettierrc.toml
Normal file
3
.prettierrc.toml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
trailingComma = "all"
|
||||||
|
semi = true
|
||||||
|
useTabs = true
|
22
package-lock.json
generated
22
package-lock.json
generated
@ -39,6 +39,7 @@
|
|||||||
"jest": "^29.4.2",
|
"jest": "^29.4.2",
|
||||||
"mock-socket": "^9.1.5",
|
"mock-socket": "^9.1.5",
|
||||||
"parcel": "^2.8.2",
|
"parcel": "^2.8.2",
|
||||||
|
"prettier": "^2.8.4",
|
||||||
"semantic-release": "^20.0.0",
|
"semantic-release": "^20.0.0",
|
||||||
"typescript": "^4.1.2"
|
"typescript": "^4.1.2"
|
||||||
},
|
},
|
||||||
@ -12098,6 +12099,21 @@
|
|||||||
"node": ">= 0.8.0"
|
"node": ">= 0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/prettier": {
|
||||||
|
"version": "2.8.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
|
||||||
|
"integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"prettier": "bin-prettier.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.13.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/pretty-format": {
|
"node_modules/pretty-format": {
|
||||||
"version": "29.4.2",
|
"version": "29.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.2.tgz",
|
||||||
@ -22948,6 +22964,12 @@
|
|||||||
"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
|
"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"prettier": {
|
||||||
|
"version": "2.8.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
|
||||||
|
"integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"pretty-format": {
|
"pretty-format": {
|
||||||
"version": "29.4.2",
|
"version": "29.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.2.tgz",
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
"module": {}
|
"module": {}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"format": "prettier --write .",
|
||||||
"build": "parcel build",
|
"build": "parcel build",
|
||||||
"lint": "eslint --ext .js,.ts . && npm run check",
|
"lint": "eslint --ext .js,.ts . && npm run check",
|
||||||
"check": "tsc --noEmit",
|
"check": "tsc --noEmit",
|
||||||
@ -98,6 +99,7 @@
|
|||||||
"jest": "^29.4.2",
|
"jest": "^29.4.2",
|
||||||
"mock-socket": "^9.1.5",
|
"mock-socket": "^9.1.5",
|
||||||
"parcel": "^2.8.2",
|
"parcel": "^2.8.2",
|
||||||
|
"prettier": "^2.8.4",
|
||||||
"semantic-release": "^20.0.0",
|
"semantic-release": "^20.0.0",
|
||||||
"typescript": "^4.1.2"
|
"typescript": "^4.1.2"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user