From 4d11be9970a3637dd541f3b801a7c409e860e1a6 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 20 Aug 2025 23:25:51 +0100 Subject: [PATCH] build: update vscode config --- .ignore | 5 +++ CONTRIBUTING.md | 20 +++++----- hugo-blox-builder.code-workspace | 68 +++++++++++++++++++++++++++++++- 3 files changed, 82 insertions(+), 11 deletions(-) create mode 100644 .ignore diff --git a/.ignore b/.ignore new file mode 100644 index 00000000..258a7afa --- /dev/null +++ b/.ignore @@ -0,0 +1,5 @@ +# Hide Bootstrap module and starters from ripgrep/VS Code search +modules/blox-bootstrap/** +starters-bootstrap/** + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e32f151f..f7278a76 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,15 +66,15 @@ git clone https://github.com//hugo-blox-builder.git **View a template** -[Install Yarn](https://yarnpkg.com/), the project's build system if necessary. +[Install pnpm](https://pnpm.io/), the project's package manager. Then choose the starter template you wish to view, such as _minimal_: ```sh -yarn view:local academic-cv +pnpm view:local academic-cv ``` -Note that Hugo Server can occasionally stop working after changes are made (sometimes showing unrelated errors). If this happens, stop Hugo (Control-C) and restart it with the `yarn view:local ...` command above. +Note that Hugo Server can occasionally stop working after changes are made (sometimes showing unrelated errors). If this happens, stop Hugo (Control-C) and restart it with the `pnpm view:local ...` command above. **Implement your improvements** @@ -82,12 +82,12 @@ Implement you changes and then check for any linting or formatting issues. Code linting and formatting form part of the Continuous Integration process to help catch bugs and code issues in contributions. -Contributors can also run the flow on their fork of the "Hugo Blox Builder" repo when making contributions (you'll need Node and Yarn to run): +Contributors can also run the flow on their fork of the "Hugo Blox Builder" repo when making contributions (you'll need Node and pnpm to run): ```sh -yarn install -yarn run lint -yarn run format +pnpm install +pnpm run lint +pnpm run format ``` **Open a Pull Request with your changes** @@ -146,9 +146,9 @@ For example: ### Linting and formatting ```sh -yarn install -yarn run lint -yarn run format +pnpm install +pnpm run lint +pnpm run format ``` ## Scope diff --git a/hugo-blox-builder.code-workspace b/hugo-blox-builder.code-workspace index 876a1499..4cf36b35 100644 --- a/hugo-blox-builder.code-workspace +++ b/hugo-blox-builder.code-workspace @@ -4,5 +4,71 @@ "path": "." } ], - "settings": {} + "settings": { + "files.exclude": { + "**/modules/blox-bootstrap/**": true, + "**/starters-bootstrap/**": true, + "**/node_modules/**": true, + "**/public/**": true, + "**/resources/**": true, + "**/pagefind/**": true + }, + "search.exclude": { + "**/modules/blox-bootstrap/**": true, + "**/starters-bootstrap/**": true, + "**/node_modules/**": true, + "**/public/**": true, + "**/resources/**": true, + "**/pagefind/**": true + }, + "files.watcherExclude": { + "**/node_modules/**": true, + "**/public/**": true, + "**/resources/**": true, + "**/pagefind/**": true + }, + "explorer.excludeGitIgnore": true, + + "npm.packageManager": "pnpm", + + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" + }, + + "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + + "eslint.workingDirectories": [{ "mode": "auto" }], + "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"], + + "stylelint.validate": ["css"], + + "tailwindCSS.emmetCompletions": true, + + "yaml.validate": true + }, + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "stylelint.vscode-stylelint", + "bradlc.vscode-tailwindcss", + "redhat.vscode-yaml", + "tamasfe.even-better-toml", + "DavidAnson.vscode-markdownlint", + "ms-python.python", + "charliermarsh.ruff", + "streetsidesoftware.code-spell-checker", + "mikestead.dotenv", + "eamodio.gitlens", + "bierner.markdown-mermaid" + ] + } } \ No newline at end of file