Compare commits
5 Commits
renovate/g
...
e5773d3235
| Author | SHA1 | Date | |
|---|---|---|---|
|
e5773d3235
|
|||
|
0d97efec68
|
|||
| 9e9740b8b1 | |||
| 65486738c0 | |||
| 25e4ba9f71 |
37
.devcontainer/devcontainer.json
Normal file
37
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"name": "JS Dev Container",
|
||||||
|
"image": "mcr.microsoft.com/devcontainers/javascript-node:4-20",
|
||||||
|
"features": {
|
||||||
|
"ghcr.io/devcontainers/features/git:1": {},
|
||||||
|
"ghcr.io/devcontainers/features/git-lfs:1": {},
|
||||||
|
"ghcr.io/devcontainers-extra/features/pre-commit:2": {},
|
||||||
|
"ghcr.io/devcontainers-extra/features/npm-packages:1": {
|
||||||
|
"packages": "@google/gemini-cli"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"ms-python.python",
|
||||||
|
"esbenp.prettier-vscode",
|
||||||
|
"vitest.explorer",
|
||||||
|
"google.gemini-cli-vscode-ide-companion",
|
||||||
|
"google.geminicodeassist"
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"postStartCommand": "bash .devcontainer/setup.sh",
|
||||||
|
"remoteUser": "node",
|
||||||
|
"updateRemoteUserUID": true,
|
||||||
|
"mounts": [
|
||||||
|
"source=pipx-venvs,target=/home/node/.local/share/pipx,type=volume",
|
||||||
|
"source=pipx-bin,target=/home/node/.local/bin,type=volume",
|
||||||
|
"source=pre-commit-cache,target=/home/node/.cache/pre-commit,type=volume",
|
||||||
|
"source=${localEnv:USERPROFILE}/.gemini,target=/home/node/.gemini,type=bind",
|
||||||
|
"source=gvscode-extensions,target=/home/node/.cache/google-vscode-extension,type=volume"
|
||||||
|
]
|
||||||
|
}
|
||||||
11
.devcontainer/setup.sh
Normal file
11
.devcontainer/setup.sh
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# 1. Fix Git Permissions (Critical in Docker)
|
||||||
|
git config --global --add safe.directory $(pwd)
|
||||||
|
|
||||||
|
# In your setup.sh or postCreateCommand
|
||||||
|
sudo chown -R node:node /home/node/.cache/
|
||||||
|
|
||||||
|
# 2. Re-connect Git Hooks
|
||||||
|
pre-commit install
|
||||||
|
pre-commit install-hooks
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
name: Lint
|
name: Lint
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre-commit-lint:
|
pre-commit-lint:
|
||||||
name: pre-commit Linting
|
name: pre-commit Linting
|
||||||
runs-on: pi
|
runs-on: pi
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
- run: pip install pre-commit
|
- run: pip install pre-commit
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Pre Commit
|
- name: Pre Commit
|
||||||
run: SKIP=no-commit-to-branch pre-commit run -a
|
run: SKIP=no-commit-to-branch pre-commit run -a
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -1,56 +1,53 @@
|
|||||||
exclude: ^node_modules/
|
exclude: ^node_modules/
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v6.0.0
|
rev: v6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: end-of-file-fixer
|
- id: check-yaml
|
||||||
exclude: (.txt$|.ipynb$|README.md$|readme.mde$)
|
- id: check-json
|
||||||
- id: trailing-whitespace
|
- id: check-toml
|
||||||
exclude: (.txt$|README.md$)
|
- id: check-xml
|
||||||
- id: check-yaml
|
- id: check-added-large-files
|
||||||
- id: check-json
|
args: [--enforce-all]
|
||||||
- id: check-toml
|
- id: name-tests-test
|
||||||
- id: check-xml
|
- id: detect-private-key
|
||||||
- id: check-added-large-files
|
- id: check-case-conflict
|
||||||
args: [--enforce-all]
|
- id: check-symlinks
|
||||||
- id: name-tests-test
|
- id: check-docstring-first
|
||||||
- id: detect-private-key
|
- id: pretty-format-json
|
||||||
- id: check-case-conflict
|
args: [--autofix, --no-sort-keys, --no-ensure-ascii]
|
||||||
- id: check-symlinks
|
- id: check-merge-conflict
|
||||||
- id: check-docstring-first
|
- id: no-commit-to-branch
|
||||||
- id: pretty-format-json
|
|
||||||
args: [--autofix, --no-sort-keys, --no-ensure-ascii]
|
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
|
||||||
- id: check-merge-conflict
|
rev: v2.15.0
|
||||||
- id: no-commit-to-branch
|
hooks:
|
||||||
args: [--branch, main]
|
- id: pretty-format-ini
|
||||||
|
args: [--autofix]
|
||||||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
|
- id: pretty-format-toml
|
||||||
rev: v2.15.0
|
args: [--autofix]
|
||||||
hooks:
|
- id: pretty-format-yaml
|
||||||
- id: pretty-format-ini
|
args: [--autofix]
|
||||||
args: [--autofix]
|
|
||||||
- id: pretty-format-toml
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
args: [--autofix]
|
rev: v4.0.0-alpha.8
|
||||||
- id: pretty-format-yaml
|
hooks:
|
||||||
args: [--autofix]
|
- id: prettier
|
||||||
|
types_or: [css, javascript]
|
||||||
- repo: https://github.com/frnmst/md-toc
|
|
||||||
rev: 9.0.0
|
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||||
hooks:
|
rev: 0.36.0
|
||||||
- id: md-toc
|
hooks:
|
||||||
|
- id: check-renovate
|
||||||
- repo: https://github.com/Lucas-C/pre-commit-hooks-java
|
- id: check-github-actions
|
||||||
rev: 1.3.10
|
- id: check-github-workflows
|
||||||
hooks:
|
|
||||||
- id: validate-html
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v6.0.0
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
hooks:
|
||||||
rev: v4.0.0-alpha.8
|
- id: end-of-file-fixer
|
||||||
hooks:
|
exclude: (.txt$|.ipynb$|README.md$|readme.mde$)
|
||||||
- id: prettier
|
- id: trailing-whitespace
|
||||||
types_or: [css, javascript]
|
exclude: (.txt$|README.md$)
|
||||||
|
- id: mixed-line-ending
|
||||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
args: [--fix=lf]
|
||||||
rev: 0.36.0
|
|
||||||
hooks:
|
|
||||||
- id: check-renovate
|
|
||||||
|
|||||||
Reference in New Issue
Block a user