mirror of
https://github.com/Mastermindzh/code-style-conventions.git
synced 2025-08-02 15:44:03 +02:00
added some defaults :)
This commit is contained in:
43
prettier/index.js
Normal file
43
prettier/index.js
Normal file
@@ -0,0 +1,43 @@
|
||||
module.exports = {
|
||||
// line length
|
||||
printWidth: 100,
|
||||
|
||||
// indentation type
|
||||
useTabs: false,
|
||||
|
||||
// whether to prefer ' over "
|
||||
singleQuote: false,
|
||||
|
||||
// whether we want to quote props (only-if-they-have-a-dash)
|
||||
quoteProps: "as-needed",
|
||||
|
||||
// add trailing comma's everwhere as long as it's supported by es5
|
||||
trailingComma: "es5",
|
||||
|
||||
// space brackets method ( param1, param2 ) { }
|
||||
bracketSpacing: true,
|
||||
|
||||
// places the > sign on a newline when closing a long html tag
|
||||
jsxBracketSameLine: false,
|
||||
|
||||
// always add parentheses on arrow functions (x) => { }
|
||||
arrowParens: "always",
|
||||
|
||||
// ignore pragma, run prettier on all files
|
||||
requirePragma: false,
|
||||
|
||||
// preserve markdown text as-is
|
||||
proseWrap: "preserve",
|
||||
|
||||
// make css leading in whitespace sensitivity
|
||||
htmlWhitespaceSensitivity: "css",
|
||||
|
||||
// always end lines with lf
|
||||
endOfLine: "lf",
|
||||
|
||||
// tabs are 2 spaces.
|
||||
tabWidth: 2,
|
||||
|
||||
// always end statements with a semicolon
|
||||
semi: true
|
||||
};
|
32
prettier/package.json
Normal file
32
prettier/package.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "@mastermindzh/prettier-config",
|
||||
"version": "1.0.0",
|
||||
"description": "My preferred prettier config",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"patch": "npm --no-git-tag-version version patch",
|
||||
"minor": "npm --no-git-tag-version version minor",
|
||||
"major": "npm --no-git-tag-version version major",
|
||||
"release": "git add -A && git commit -m 'version bump and build' && npm publish --access public && echo 'All done, don't forget to push!'",
|
||||
"release-patch": "npm run patch && npm run release",
|
||||
"release-minor": "npm run minor && npm run release",
|
||||
"release-major": "npm run major && npm run release"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Mastermindzh/prettier-config.git"
|
||||
},
|
||||
"keywords": [
|
||||
"prettier",
|
||||
"config",
|
||||
"mastermindzh",
|
||||
"rick van lieshout",
|
||||
"lieshout"
|
||||
],
|
||||
"author": "Rick van Lieshout",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Mastermindzh/prettier-config/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Mastermindzh/prettier-config#readme"
|
||||
}
|
Reference in New Issue
Block a user