From 3848d20fe7251e8bb495d194235fa1f8d328e162 Mon Sep 17 00:00:00 2001 From: Naoki Oketani Date: Mon, 5 May 2025 06:14:42 +0000 Subject: [PATCH] refactor(config): migrate from .editorconfig and .prettierrc.json to .prettierrc.yml --- .clinerules/rules.md | 10 ++++++++-- .editorconfig | 18 ------------------ .prettierrc.json | 10 ---------- .prettierrc.yml | 16 ++++++++++++++++ 4 files changed, 24 insertions(+), 30 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .prettierrc.json create mode 100644 .prettierrc.yml diff --git a/.clinerules/rules.md b/.clinerules/rules.md index aa58ad4..ae323bd 100644 --- a/.clinerules/rules.md +++ b/.clinerules/rules.md @@ -21,9 +21,15 @@ This document outlines the development guidelines and best practices for our Typ - 2-space indentation (`tabWidth: 2`) - No semicolons (`semi: false`) - Single quotes (`singleQuote: true`) + - Quote properties as-needed (`quoteProps: "as-needed"`) + - No single quotes in JSX (`jsxSingleQuote: false`) - No trailing commas (`trailingComma: "none"`) - - Avoid parentheses around single arrow function parameters (`arrowParens: "avoid"`) - - Use TypeScript parser (`parser: "typescript"`) + - Include spaces in object literals (`bracketSpacing: true`) + - Place closing brackets on the same line (`bracketSameLine: true`) + - Always include parentheses around arrow function parameters (`arrowParens: "always"`) + - Always wrap prose (`proseWrap: "always"`) + - CSS-based HTML whitespace sensitivity (`htmlWhitespaceSensitivity: "css"`) + - Use LF line endings (`endOfLine: "lf"`) - Configure ESLint with TypeScript parser for static code analysis - Enforce consistent naming conventions: - camelCase for variables and functions diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 022b964..0000000 --- a/.editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -max_line_length = 0 -trim_trailing_whitespace = false - -[*.{py,rs}] -indent_size = 4 - -[Makefile] -indent_style = tab -indent_size = 8 diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 202cbf6..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "semi": false, - "singleQuote": true, - "trailingComma": "none", - "arrowParens": "avoid", - "parser": "typescript" -} diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 0000000..49c9385 --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1,16 @@ +# See: https://prettier.io/docs/en/configuration + +printWidth: 80 +tabWidth: 2 +useTabs: false +semi: false +singleQuote: true +quoteProps: as-needed +jsxSingleQuote: false +trailingComma: none +bracketSpacing: true +bracketSameLine: true +arrowParens: always +proseWrap: always +htmlWhitespaceSensitivity: css +endOfLine: lf