Skip to content

lexmin0412/prettier-config-standard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@lexmin0412/prettier-config-standard

English | 中文

Universal and common prettier configuration for your frontend projects.

Install

pnpm add @lexmin0412/prettier-config-standard -D

Usage

Add .prettierrc.js in you project's root directory:

module.exports = {
	...require('@lexmin0412/prettier-config-standard'),
}

Override

module.exports = {
	...require('@lexmin0412/prettier-config-standard'),
	semi: true
}

set semi to true after require @lexmin0412/prettier-config-standard will override standard configurations.

Default Configuration

there are some configuration items defined:

{
	"printWidth": 100,
	"useTabs": true,
	"tabWidth": 2,
	"semi": false,
	"singleQuote": true,
	"quoteProps": "as-needed",
	"jsxSingleQuote": false,
	"trailingComma": "all",
	"bracketSpacing": true,
	"bracketSameLine": false,
	"arrowParens": "avoid",
	"proseWrap": "never",
	"htmlWhitespaceSensitivity": "css",
	"vueIndentScriptAndStyle": false,
	"endOfLine": "lf",
	"embeddedLanguageFormatting": "auto",
	"singleAttributePerLine": true
}

Click Here to get more details about Prettier.