-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
siroi
committed
Sep 20, 2024
1 parent
9f56f62
commit 9e83a1f
Showing
1 changed file
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,30 @@ | ||
module.exports = { | ||
tabWidth: 2, | ||
tabWidth: 4, | ||
semi: true, | ||
trailingComma: 'all', | ||
singleQuote: true, | ||
printWidth: 120 | ||
/** | ||
* 建议使用 80 宽度折行 | ||
* @see https://prettier.nodejs.cn/docs/en/options.html#%E6%A0%87%E7%AD%BE%E5%AE%BD%E5%BA%A6 | ||
* @author siroi | ||
* */ | ||
printWidth: 80, | ||
/** | ||
* 文件换行符需要用 lf 目的是为了 ci | ||
* @see lf 在 Linux 和 macOS 以及 git repos 中很常见 | ||
*/ | ||
endOfLine: 'lf', | ||
bracketSameLine: true, | ||
bracketSpacing: true, | ||
/** | ||
* 允许箭头函数括号 | ||
* @author siroi | ||
* */ | ||
arrowParens: 'always', | ||
overrides: [ | ||
{ | ||
"files": ".prettierrc", | ||
"options": { "parser": "json" } | ||
} | ||
] | ||
}; |