Skip to content

Commit 8f9aa45

Browse files
committed
Adopt & enforce the mozilla-central Prettier config (#467)
Taken from: https://searchfox.org/mozilla-central/rev/49011d374b626d5f0e7dc751a8a57365878e65f1/.prettierrc Explicitly include `arrowParens: avoid` to keep the Prettier v1 default.
1 parent aa8555f commit 8f9aa45

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ jobs:
3131
- uses: actions/setup-node@v3
3232
- run: npm install --legacy-peer-deps
3333
- run: npm run lint
34+
- run: npx prettier --check .
3435
- run: npm run coverage
3536
- run: npx nyc report --reporter=text

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.nyc_output/
2+
bench/
3+
coverage/
4+
node_modules/

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"arrowParens": "avoid",
3+
"endOfLine": "lf",
4+
"printWidth": 80,
5+
"tabWidth": 2,
6+
"trailingComma": "es5"
7+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"dev:watch": "watch 'npm run coverage' lib/ test/",
7575
"predev": "npm run setup",
7676
"dev": "npm-run-all -p --silent dev:*",
77-
"prettier": "prettier --write *.* lib/ test/",
77+
"prettier": "prettier --write .",
7878
"clean": "rm -rf coverage .nyc_output",
7979
"toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
8080
},

0 commit comments

Comments
 (0)