6 changed files with 130 additions and 5 deletions
@ -0,0 +1,30 @@ |
|||||
|
{ |
||||
|
"name": "BASH Dev Container", |
||||
|
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", |
||||
|
"features": { |
||||
|
"ghcr.io/devcontainers-community/npm-features/prettier:1": { |
||||
|
"plugins": "prettier-plugin-sh" |
||||
|
}, |
||||
|
"ghcr.io/devcontainers-extra/features/actionlint:1": {}, |
||||
|
"ghcr.io/devcontainers-extra/features/checkov:1": {}, |
||||
|
"ghcr.io/devcontainers-extra/features/markdownlint-cli:1": {}, |
||||
|
"ghcr.io/devcontainers-extra/features/shellcheck:1": {}, |
||||
|
"ghcr.io/devcontainers-extra/features/yamllint:2": {}, |
||||
|
"ghcr.io/devcontainers/features/github-cli:1": {} |
||||
|
}, |
||||
|
"customizations": { |
||||
|
"vscode": { |
||||
|
"extensions": [ |
||||
|
"DavidAnson.vscode-markdownlint", |
||||
|
"editorconfig.editorconfig", |
||||
|
"esbenp.prettier-vscode", |
||||
|
"github.vscode-github-actions", |
||||
|
"GitHub.vscode-pull-request-github", |
||||
|
"redhat.vscode-yaml", |
||||
|
"timonwong.shellcheck", |
||||
|
"yzhang.markdown-all-in-one" |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
"postCreateCommand": "npm init -y >/dev/null 2>&1 || true && npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template" |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
name: Prettier |
||||
|
on: |
||||
|
push: |
||||
|
branches: |
||||
|
- "*" |
||||
|
|
||||
|
concurrency: |
||||
|
group: prettier-${{ github.ref }} |
||||
|
cancel-in-progress: true |
||||
|
|
||||
|
permissions: |
||||
|
contents: write |
||||
|
|
||||
|
jobs: |
||||
|
prettier: |
||||
|
runs-on: ubuntu-latest |
||||
|
|
||||
|
steps: |
||||
|
- name: Checkout |
||||
|
uses: actions/checkout@v5 |
||||
|
|
||||
|
- name: Install Prettier and plugins |
||||
|
run: | |
||||
|
npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template |
||||
|
|
||||
|
- name: Prettify code |
||||
|
uses: creyD/prettier_action@v4.6 |
||||
|
with: |
||||
|
prettier_plugins: "prettier-plugin-sh prettier-plugin-jinja-template" |
||||
|
prettier_options: --write . |
||||
|
github_token: ${{ secrets.GITHUB_TOKEN }} |
||||
|
commit_message: "chore(prettier): format code" |
@ -0,0 +1,49 @@ |
|||||
|
--- |
||||
|
name: Super Linter |
||||
|
|
||||
|
on: |
||||
|
workflow_dispatch: |
||||
|
push: |
||||
|
branches: |
||||
|
- "*" |
||||
|
|
||||
|
concurrency: |
||||
|
group: super-linter-${{ github.ref }} |
||||
|
cancel-in-progress: true |
||||
|
|
||||
|
permissions: {} |
||||
|
|
||||
|
jobs: |
||||
|
build: |
||||
|
name: Lint |
||||
|
runs-on: ubuntu-latest |
||||
|
|
||||
|
permissions: |
||||
|
contents: read |
||||
|
packages: read |
||||
|
# To report GitHub Actions status checks |
||||
|
statuses: write |
||||
|
|
||||
|
steps: |
||||
|
- name: Checkout code |
||||
|
uses: actions/checkout@v5 |
||||
|
with: |
||||
|
# super-linter needs the full git history to get the |
||||
|
# list of files that changed across commits |
||||
|
fetch-depth: 0 |
||||
|
|
||||
|
- name: Install Prettier plugins (for summary formatting) |
||||
|
run: | |
||||
|
npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template || true |
||||
|
|
||||
|
- name: Super-linter |
||||
|
uses: super-linter/super-linter@v8 |
||||
|
env: |
||||
|
# To report GitHub Actions status checks |
||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
|
VALIDATE_JSCPD: false |
||||
|
VALIDATE_SHELL_SHFMT: false |
||||
|
VALIDATE_YAML_PRETTIER: false |
||||
|
VALIDATE_JSON_PRETTIER: false |
||||
|
VALIDATE_MARKDOWN_PRETTIER: false |
||||
|
VALIDATE_NATURAL_LANGUAGE: false |
@ -1,2 +1,11 @@ |
|||||
.vscode/settings.json |
# Visual Studio Code |
||||
/node_modules |
.vscode/* |
||||
|
!.vscode/tasks.json |
||||
|
!.vscode/launch.json |
||||
|
!.vscode/extensions.json |
||||
|
!.vscode/*.code-snippets |
||||
|
.history/ |
||||
|
*.vsix |
||||
|
|
||||
|
# Node.js |
||||
|
node_modules |
||||
|
@ -0,0 +1,3 @@ |
|||||
|
{ |
||||
|
"plugins": ["prettier-plugin-sh"] |
||||
|
} |
@ -1,10 +1,12 @@ |
|||||
{ |
{ |
||||
"recommendations": [ |
"recommendations": [ |
||||
"ms-python.python", |
"DavidAnson.vscode-markdownlint", |
||||
"editorconfig.editorconfig", |
"editorconfig.editorconfig", |
||||
"yzhang.markdown-all-in-one", |
|
||||
"esbenp.prettier-vscode", |
"esbenp.prettier-vscode", |
||||
|
"github.vscode-github-actions", |
||||
|
"GitHub.vscode-pull-request-github", |
||||
|
"redhat.vscode-yaml", |
||||
"timonwong.shellcheck", |
"timonwong.shellcheck", |
||||
"redhat.vscode-yaml" |
"yzhang.markdown-all-in-one" |
||||
] |
] |
||||
} |
} |
||||
|
Loading…
Reference in new issue