Skip to content

Commit 01fce55

Browse files
committed
Add prettierx and tentatively use it for some formatting
I'm using prettierx, which is a fork of prettier so that we can have spaces before the brackets in a function declaration. I don't like how restrictive prettier is concerning its configuration and formatting. - it messes up some indentation in specs/ - it removes a second newline when I specifically want to have two - it doesn't allow spaces before brackets in function declarations (hence prettierx) - it adds spaces for function parameters with default values None of this is configurable. So auto-formatting is not turned on by default, but it might be a useful tool in some cases. Fixes an issue where indentation was off in converse-core.js, causing vim-sleuth to wrongly indent by three spaces only.
1 parent 085a4c6 commit 01fce55

File tree

4 files changed

+290
-252
lines changed

4 files changed

+290
-252
lines changed

.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"arrowParens": "avoid",
3+
"printWidth": 100,
4+
"quoteProps": "preserve",
5+
"singleQuote": true,
6+
"spaceBeforeFunctionParen": true,
7+
"tabWidth": 4
8+
}

package-lock.json

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"node-sass": "^4.11.0",
9191
"npm": "^6.4.1",
9292
"po2json": "^0.4.4",
93+
"prettierx": "^0.6.0",
9394
"requirejs": "2.3.5",
9495
"run-headless-chromium": "^0.1.1",
9596
"sass-loader": "^7.1.0",

0 commit comments

Comments
 (0)