Skip to content

Commit d87d193

Browse files
authored
chore: add prettier-php plugin (doocs#1031)
1 parent dc79ba6 commit d87d193

File tree

4 files changed

+139
-4
lines changed

4 files changed

+139
-4
lines changed

.github/workflows/prettier.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- name: Prettify code
2323
uses: creyD/prettier_action@v4.3
2424
with:
25-
prettier_options: --write **/*.{js,ts,md}
25+
prettier_options: --write **/*.{js,ts,php,md}
26+
prettier_plugins: '@prettier/plugin-php'
2627
only_changed: true
2728
commit_message: "style: format code with prettier"

.prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"singleQuote": true,
66
"trailingComma": "all",
77
"bracketSpacing": true,
8-
"arrowParens": "avoid"
8+
"arrowParens": "avoid",
9+
"phpVersion": "8.1"
910
}

package-lock.json

+134-2
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
@@ -10,6 +10,7 @@
1010
"devDependencies": {
1111
"@commitlint/cli": "^17.6.5",
1212
"@commitlint/config-conventional": "^17.6.5",
13+
"@prettier/plugin-php": "^0.19.5",
1314
"husky": "^8.0.3",
1415
"lint-staged": "^13.2.2",
1516
"prettier": "^2.8.8"

0 commit comments

Comments
 (0)