0.3.1 • Published 6 months ago

@avolantis/prettier-config v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@avolantis/prettier-config

npm code style: prettier

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}

0.3.0

6 months ago

0.2.0

10 months ago

0.3.1

6 months ago

0.1.2

3 years ago

0.1.1-alpha.0

3 years ago

0.1.1

3 years ago

0.1.1-alpha.1

3 years ago

0.1.0

4 years ago