mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-11-05 18:56:09 +08:00
add-prettier: Add github action to check by prettier
This commit is contained in:
19
.github/workflows/test-workflow.yml
vendored
19
.github/workflows/test-workflow.yml
vendored
@@ -59,3 +59,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Test i18n packs integrity
|
- name: Test i18n packs integrity
|
||||||
run: npm run test:i18n-packs
|
run: npm run test:i18n-packs
|
||||||
|
|
||||||
|
prettier:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Use Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: .nvmrc
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Test with prettier
|
||||||
|
run: npm run test:prettier
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
"test:eslint:fix": "npm run test:eslint -- --fix",
|
"test:eslint:fix": "npm run test:eslint -- --fix",
|
||||||
"test:stylelint": "stylelint 'src/**/*.scss' --config node_modules/do-bulma/.stylelintrc.json",
|
"test:stylelint": "stylelint 'src/**/*.scss' --config node_modules/do-bulma/.stylelintrc.json",
|
||||||
"test:i18n-packs": "node --es-module-specifier-resolution=node src/nginxconfig/i18n/verify.js",
|
"test:i18n-packs": "node --es-module-specifier-resolution=node src/nginxconfig/i18n/verify.js",
|
||||||
|
"test:prettier": "npm run prettier:check",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"prettier": "prettier --write 'src/**/*.{js,vue}'",
|
"prettier": "prettier --write 'src/**/*.{js,vue}'",
|
||||||
"prettier:check": "prettier 'src/**/*.{js,vue}' --check"
|
"prettier:check": "prettier 'src/**/*.{js,vue}' --check"
|
||||||
|
|||||||
Reference in New Issue
Block a user