kopia lustrzana https://github.com/simonw/datasette
Install Prettier via package.json (#1170)
* Error if Prettier isn't already installed * Temporarily run Prettier check on every commit * Install and run Prettier via package.json * Trigger another prettier check on CIpull/1203/head
rodzic
1e8fa3ac7c
commit
3054e0f730
|
@ -1,9 +1,6 @@
|
|||
name: Check JavaScript for conformance with Prettier
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'datasette/static/*'
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
prettier:
|
||||
|
@ -15,9 +12,11 @@ jobs:
|
|||
name: Configure npm caching
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }}
|
||||
key: ${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-npm-
|
||||
${{ runner.OS }}-npm-
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run prettier
|
||||
run: |-
|
||||
npx prettier --check 'datasette/static/*[!.min].js'
|
||||
npx --no-install prettier --check 'datasette/static/*[!.min].js'
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "datasette",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"devDependencies": {
|
||||
"prettier": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
|
||||
"integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"prettier": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
|
||||
"integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "datasette",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"prettier": "^2.2.1"
|
||||
}
|
||||
}
|
Ładowanie…
Reference in New Issue