refactor(config): migrate from .editorconfig and .prettierrc.json to .prettierrc.yml

This commit is contained in:
Naoki Oketani
2025-05-05 06:14:42 +00:00
parent e9c5206141
commit 3848d20fe7
4 changed files with 24 additions and 30 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -1,10 +0,0 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"parser": "typescript"
}

16
.prettierrc.yml Normal file
View File

@@ -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