Skip to content

Commit e179314

Browse files
committed
chore(prettier-config): fix prettier bin path; ensure all scripts are calling the alias
1 parent 737d859 commit e179314

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

configs/eslint-config-compass/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
"eslint-plugin-react-hooks": "^4.2.0"
3030
},
3131
"scripts": {
32+
"prettier": "prettier-compass",
3233
"check": "npm run lint",
33-
"lint": "prettier --check .",
34-
"reformat": "prettier --write ."
34+
"lint": "npm run prettier -- --check .",
35+
"reformat": "npm run prettier -- --write ."
3536
},
3637
"repository": {
3738
"type": "git",

configs/prettier-config-compass/bin/prettier.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ if (process.argv.some((arg) => /^--(no-)?config/.test(arg))) {
55
throw new Error('--config option is not allowed');
66
}
77
process.argv.push('--config', path.resolve(__dirname, '..', 'index.js'));
8-
require('prettier/cli.js');
8+
require('prettier/bin-prettier.js');

configs/prettier-config-compass/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
"@mongodb-js/prettier-config-devtools": "^1.0.1"
1515
},
1616
"scripts": {
17+
"prettier": "prettier-compass",
1718
"check": "npm run lint",
18-
"lint": "prettier --check .",
19-
"reformat": "prettier --write ."
19+
"lint": "npm run prettier -- --check .",
20+
"reformat": "npm run prettier -- --write ."
2021
},
2122
"repository": {
2223
"type": "git",

0 commit comments

Comments
 (0)