Skip to content

Commit eea8ff4

Browse files
committed
Add esformatter
1 parent 03c8dc9 commit eea8ff4

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

esformatter-config.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"lineBreak": {
3+
"before": {
4+
"FunctionDeclaration": ">=2",
5+
"FunctionDeclarationOpeningBrace": 0,
6+
"FunctionDeclarationClosingBrace": 1,
7+
"MethodDefinition": ">=2",
8+
"ClassDeclaration": ">=2",
9+
"ExportNamedDeclaration": 2
10+
},
11+
"after": {
12+
"FunctionDeclaration": ">=2",
13+
"FunctionDeclarationOpeningBrace": 1,
14+
"MethodDefinitionClosingBrace": ">=2",
15+
"ClassClosingBrace": ">=2"
16+
}
17+
}
18+
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"scripts": {
1515
"test": "bash scripts/test-all.sh && npm run lint",
1616
"lint": "eslint --quiet src/",
17+
"format": "esformatter --config esformatter-config.json -i src/sync.js",
1718
"build": "NODE_ENV=production webpack --mode=production",
1819
"dev": "webpack -w --mode=development",
1920
"postshrinkwrap": "if [ \"`uname`\" = \"Darwin\" ]; then sed -i '' -e 's/http:\\/\\//https:\\/\\//g' package-lock.json; else sed -i -e 's/http:\\/\\//https:\\/\\//g' package-lock.json; fi",

0 commit comments

Comments
 (0)