From e20aef2f3294c0df485e3e94a96b8b1dd7c01d3c Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 26 Feb 2025 12:05:32 +0100 Subject: [PATCH] Add editor configs Add .editorconfig, .vscode and .gitattributes configs to make editors and tools aware that the files use unix line indeings and are indentent with tabs. --- .editorconfig | 13 +++++++++++++ .gitattributes | 1 + .vscode/settings.json | 20 ++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .vscode/settings.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..b2e54f7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}] +charset = utf-8 +end_of_line = lf +indent_size = tab +indent_style = tab +insert_final_newline = true +trim_trailing_whitespace = true + +*{.yaml,.yml}] +indent_size = 2 +indent_style = space diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..18647fe --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,20 @@ +{ + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "tsconfig.json": "tsconfig.*.json, env.d.ts", + "vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*", + "package.json": "package-lock.json, bun.lockb, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .prettier*, prettier*" + }, + "editor.codeActionsOnSave": { + "source.fixAll": "explicit" + }, + "editor.detectIndentation": false, + "editor.insertSpaces": false, + "files.eol": "\n", + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "[yaml]": { + "editor.indentSize": 2, + "editor.insertSpaces": true, + }, +}