Try using the pinned version of prettier

This commit is contained in:
cmdr2 2023-04-29 08:04:15 +05:30
parent 4dc2a96d41
commit 51e067b050
3 changed files with 41 additions and 11 deletions

View File

@ -10,18 +10,16 @@ jobs:
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@v2 uses: actions/checkout@v2
- uses: actions/cache@v2 - uses: actions/setup-node@v3
name: Configure npm caching
with: with:
path: ~/.npm node-version: 16
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }} cache: 'npm'
restore-keys: | - run: npm ci
${{ runner.os }}-npm-
- name: Run prettier - name: Run prettier
run: |- run: |-
npm run prettier-fix npm run prettier-fix
- name: Print the diff - name: Print the required changes
run: git diff; git reset --hard run: git diff; git reset --hard
- name: Run prettier - name: Check prettier
run: |- run: |-
npm run prettier-check npm run prettier-check

32
package-lock.json generated Normal file
View File

@ -0,0 +1,32 @@
{
"name": "stable-diffusion-ui",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"devDependencies": {
"prettier": "1.19.1"
}
},
"node_modules/prettier": {
"version": "1.19.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=4"
}
}
},
"dependencies": {
"prettier": {
"version": "1.19.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
"dev": true
}
}
}

View File

@ -1,9 +1,9 @@
{ {
"scripts": { "scripts": {
"prettier-fix": "npx prettier --write \"./**/*.js\" --config .prettierrc.json", "prettier-fix": "npx prettier --write \"./**/*.js\"",
"prettier-check": "npx prettier --check \"./**/*.js\" --config .prettierrc.json" "prettier-check": "npx prettier --check \"./**/*.js\""
}, },
"devDependencies": { "devDependencies": {
"prettier": "^1.19.1" "prettier": "1.19.1"
} }
} }