-
-
Notifications
You must be signed in to change notification settings - Fork 213
feat: add EditorConfig, VS Code settings & extension recommendations for consistent DX #748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # EditorConfig helps maintain consistent coding styles across editors | ||
| # https://editorconfig.org | ||
|
|
||
| # Top-most EditorConfig file | ||
| root = true | ||
|
|
||
| # ── Defaults for all files ────────────────────────────────────────── | ||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| indent_style = space | ||
| indent_size = 2 | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| # ── Source files (JS / TS / JSX / TSX) ────────────────────────────── | ||
| [*.{js,jsx,ts,tsx}] | ||
| indent_size = 2 | ||
| max_line_length = 100 | ||
|
|
||
| # ── Web markup & styles ──────────────────────────────────────────── | ||
| [*.{html,css,scss}] | ||
| indent_size = 2 | ||
|
|
||
| # ── Data / config (JSON, YAML, TOML) ─────────────────────────────── | ||
| [*.{json,jsonc,yml,yaml,toml}] | ||
| indent_size = 2 | ||
|
|
||
| # ── Markdown ──────────────────────────────────────────────────────── | ||
| # Trailing whitespace is meaningful in Markdown (line breaks) | ||
| [*.md] | ||
| trim_trailing_whitespace = false | ||
|
|
||
| # ── Shell scripts ─────────────────────────────────────────────────── | ||
| [*.{sh,bash,zsh}] | ||
| indent_size = 2 | ||
|
|
||
| # ── Makefiles require tabs ────────────────────────────────────────── | ||
| [Makefile] | ||
| indent_style = tab | ||
|
|
||
| # ── GitHub Actions & CI workflows ─────────────────────────────────── | ||
| [.github/**/*.yml] | ||
| indent_size = 2 | ||
|
|
||
| # ── Minified files — do not touch ─────────────────────────────────── | ||
| [*.min.*] | ||
| indent_style = ignore | ||
| insert_final_newline = ignore | ||
| trim_trailing_whitespace = ignore | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| // Recommended extensions for the Accord Project Template Playground. | ||
| // VS Code will suggest installing these when opening the project. | ||
| // See https://go.microsoft.com/fwlink/?LinkId=827846 for more info. | ||
| "recommendations": [ | ||
| // ── Editor & Formatting ────────────────────────────────────── | ||
| "editorconfig.editorconfig", // EditorConfig support | ||
| "esbenp.prettier-vscode", // Prettier – code formatter | ||
| "dbaeumer.vscode-eslint", // ESLint – JS/TS linter | ||
| // ── Languages & Frameworks ─────────────────────────────────── | ||
| "ms-vscode.vscode-typescript-next", // TypeScript nightly (better DX) | ||
| "bradlc.vscode-tailwindcss", // Tailwind CSS IntelliSense | ||
| "styled-components.vscode-styled-components", // Styled-components syntax | ||
| // ── React & JSX/TSX ────────────────────────────────────────── | ||
| "dsznajder.es7-react-js-snippets", // React/Redux/GraphQL snippets | ||
| // ── Testing ────────────────────────────────────────────────── | ||
| "ms-playwright.playwright", // Playwright Test runner | ||
| "vitest.explorer", // Vitest test explorer | ||
| // ── Developer Quality-of-Life ──────────────────────────────── | ||
| "streetsidesoftware.code-spell-checker", // Spell checker for code | ||
| "mikestead.dotenv", // .env syntax highlighting | ||
| "csstools.postcss", // PostCSS language support | ||
| "yoavbls.pretty-ts-errors" // Human-readable TS errors | ||
| ], | ||
| "unwantedRecommendations": [] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| { | ||
| // ── Editor Defaults ──────────────────────────────────────────── | ||
| "editor.formatOnSave": true, | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
|
||
| "editor.tabSize": 2, | ||
| "editor.insertSpaces": true, | ||
| "editor.codeActionsOnSave": { | ||
| "source.fixAll.eslint": "explicit" | ||
| }, | ||
| // ── File Handling ────────────────────────────────────────────── | ||
| "files.eol": "\n", | ||
| "files.trimTrailingWhitespace": true, | ||
| "files.insertFinalNewline": true, | ||
| "files.trimFinalNewlines": true, | ||
| "files.exclude": { | ||
| "**/node_modules": true, | ||
| "**/dist": true, | ||
| "**/.git": true | ||
| }, | ||
| // ── TypeScript ───────────────────────────────────────────────── | ||
| "typescript.tsdk": "node_modules/typescript/lib", | ||
| "typescript.enablePromptUseWorkspaceTsdk": true, | ||
| // ── Tailwind CSS ─────────────────────────────────────────────── | ||
| "tailwindCSS.includeLanguages": { | ||
| "typescriptreact": "html" | ||
| }, | ||
| "tailwindCSS.experimental.classRegex": [ | ||
| [ | ||
| "className\\s*=\\s*[\"']([^\"']*)[\"']", | ||
| "([^\"'\\s]*)" | ||
| ] | ||
| ], | ||
| // ── ESLint ───────────────────────────────────────────────────── | ||
| "eslint.validate": [ | ||
| "javascript", | ||
| "javascriptreact", | ||
| "typescript", | ||
| "typescriptreact" | ||
| ], | ||
| // ── Search ───────────────────────────────────────────────────── | ||
| "search.exclude": { | ||
| "**/node_modules": true, | ||
| "**/dist": true, | ||
| "**/package-lock.json": true, | ||
| "**/playwright-report": true | ||
| }, | ||
| // ── File Associations ────────────────────────────────────────── | ||
| "[markdown]": { | ||
| "editor.wordWrap": "on", | ||
| "files.trimTrailingWhitespace": false | ||
| }, | ||
| "[json]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode" | ||
| }, | ||
| "[jsonc]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode" | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The max_line_length setting is set to 100 for JavaScript/TypeScript files, but there's no existing ESLint or Prettier configuration in the repository that enforces this limit. This could create confusion if the EditorConfig suggests one line length but no other tooling enforces it. Consider either removing this setting or adding a corresponding ESLint rule (e.g., max-len) or Prettier's printWidth configuration.