Skip to content

Commit c7ec831

Browse files
committed
build(prettier): add formatter
1 parent bdad8e2 commit c7ec831

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

.eslintrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module.exports = {
66
'eslint:recommended',
77
'plugin:eslint-plugin/recommended',
88
'plugin:node/recommended',
9-
],
9+
'prettier',
10+
],
1011
env: {
1112
node: true,
1213
},

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
node_modules/

.prettierrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"bracketSameLine": false,
3+
"bracketSpacing": false,
4+
"printWidth": 100,
5+
"tabWidth": 2,
6+
"trailingComma": "all",
7+
"semi": true,
8+
"singleQuote": true
9+
}

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"test": "mocha tests --recursive ./dist/tests/",
2929
"lint": "eslint .",
3030
"lint:eslint-docs": "update:eslint-docs --check",
31+
"format": "prettier . --write",
3132
"update:eslint-docs": "eslint-doc-generator",
3233
"publish": "yarn build; npm publish"
3334
},
@@ -41,12 +42,14 @@
4142
"@typescript-eslint/types": "^5.57.1",
4243
"@typescript-eslint/utils": "^5.57.1",
4344
"eslint": "^8.19.0",
45+
"eslint-config-prettier": "^9.1.0",
4446
"eslint-doc-generator": "^1.0.0",
4547
"eslint-plugin-eslint-plugin": "^5.0.0",
4648
"eslint-plugin-node": "^11.1.0",
4749
"mocha": "^10.0.0",
4850
"nodemon": "^2.0.22",
4951
"npm-run-all": "^4.1.5",
52+
"prettier": "3.3.2",
5053
"typescript": "^5.0.4"
5154
},
5255
"engines": {

0 commit comments

Comments
 (0)