mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 09:39:51 +00:00
chore(pwsh): add .ps1 linting to ci/cd
This commit is contained in:
1
.github/workflows/node.js.yml
vendored
1
.github/workflows/node.js.yml
vendored
@@ -22,6 +22,7 @@ jobs:
|
||||
run: |
|
||||
sh ./_scripts/install-ci-deps
|
||||
echo "${HOME}/.local/bin" >> $GITHUB_PATH
|
||||
echo "${HOME}/.local/opt/pwsh" >> $GITHUB_PATH
|
||||
- run: shfmt --version
|
||||
- run: shellcheck -V
|
||||
- run: node --version
|
||||
|
||||
@@ -7,3 +7,9 @@ curl -fsS https://webi.sh/shfmt@3.7 | sh
|
||||
|
||||
# Install 'shellcheck v0.9.x'
|
||||
curl -fsS https://webi.sh/shellcheck@0.9 | sh
|
||||
|
||||
# Install 'pwsh (PowerShell Core) v7.x'
|
||||
curl -fsS https://webi.sh/pwsh@7 | sh
|
||||
# shellcheck disable=SC1090
|
||||
. ~/.config/envman/PATH.env
|
||||
pwsh -Command "Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -AllowClobber"
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
"description": "webinstall script repository",
|
||||
"main": "_webi/",
|
||||
"scripts": {
|
||||
"fmt": "npm run prettier && npm run shfmt",
|
||||
"lint": "npm run shellcheck && npm run jshint",
|
||||
"fmt": "npm run prettier && npm run shfmt && npm run pwsh-fmt",
|
||||
"lint": "npm run shellcheck && npm run jshint && npm run pwsh-lint",
|
||||
"prepare": "npm run tooling-init && npm run git-hooks-init",
|
||||
"test": "node _webi/test.js ./node/",
|
||||
"----": "------------------------------------",
|
||||
"git-hooks-init": "node ./_scripts/git-hooks-init.js",
|
||||
"jshint": "npx -p jshint@2.x -- jshint -c ./.jshintrc --exclude 'node_modules/**/*' */*.js */*/*.js",
|
||||
"prettier": "npx -p prettier@3.x -- prettier -w '**/*.{js,md,html}'",
|
||||
"pwsh-fmt": "pwsh ./_scripts/pwsh-fmt.ps1",
|
||||
"pwsh-lint": "pwsh ./_scripts/pwsh-lint.ps1",
|
||||
"shellcheck": "shellcheck -s sh -S style --exclude=SC2154,SC2034 */*.sh",
|
||||
"shfmt": "shfmt -w -i 4 -sr -ci -s ./",
|
||||
"tooling-init": "node ./_scripts/tooling-init.js"
|
||||
|
||||
Reference in New Issue
Block a user