refactor(config): migrate from .editorconfig and .prettierrc.json to .prettierrc.yml
This commit is contained in:
@@ -21,9 +21,15 @@ This document outlines the development guidelines and best practices for our Typ
|
|||||||
- 2-space indentation (`tabWidth: 2`)
|
- 2-space indentation (`tabWidth: 2`)
|
||||||
- No semicolons (`semi: false`)
|
- No semicolons (`semi: false`)
|
||||||
- Single quotes (`singleQuote: true`)
|
- Single quotes (`singleQuote: true`)
|
||||||
|
- Quote properties as-needed (`quoteProps: "as-needed"`)
|
||||||
|
- No single quotes in JSX (`jsxSingleQuote: false`)
|
||||||
- No trailing commas (`trailingComma: "none"`)
|
- No trailing commas (`trailingComma: "none"`)
|
||||||
- Avoid parentheses around single arrow function parameters (`arrowParens: "avoid"`)
|
- Include spaces in object literals (`bracketSpacing: true`)
|
||||||
- Use TypeScript parser (`parser: "typescript"`)
|
- 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
|
- Configure ESLint with TypeScript parser for static code analysis
|
||||||
- Enforce consistent naming conventions:
|
- Enforce consistent naming conventions:
|
||||||
- camelCase for variables and functions
|
- camelCase for variables and functions
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -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
16
.prettierrc.yml
Normal 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
|
||||||
Reference in New Issue
Block a user