@avolantis/prettier-config v0.3.1
@avolantis/prettier-config
Shared prettier configuration for Avolantis code style
Install
At least version 3.5.3
but lower than 4.0.0
of
prettier is required.
pnpm add -D prettier @avolantis/prettier-config
Use
-wD
instead of-D
in a monorepo and install to the workspace root
Then in your (workspace root) package.json
:
{
"prettier": "@avolantis/prettier-config"
}
.editorconfig
and .gitattributes
It is recommended to have the code style defined in .editorconfig
files as
well. Because of the end-of-line character setting, an accompanying
.gitattributes
file is also recommended.
Note: In VS Code,
.editorconfig
support requires a plugin
# .editorconfig
root = true
[*]
charset = utf-8
end_of_line = lf
tab_width = 2
indent_size = 2
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
[{*.yml,*.yaml}]
indent_style = space
# .gitattributes
* text=auto eol=lf
Note: If binary files are committed to the repository (such as images) additional rules might be required in the
.gitattributes
file
Supported file formats (extensions)
- js, mjs, cjs, jsx
- ts, mts, d.ts, tsx
- md, mdx, astro
- vue, html, xml, svg
- css, scss, sass
- json, json5, yml, yaml
Or as a glob pattern: \
{**/*,*}.{js,mjs,cjs,jsx,ts,mts,tsx,md,mdx,astro,vue,html,xml,svg,css,scss,sass,json,json5,yml,yaml}
6 months ago
10 months ago
6 months ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago