Skip to content

Commit 6d5f92f

Browse files
committed
chore(prettier): use ESM config and drop redundant --config flags
Project is "type": "module" so plain prettier.config.js with `export default` is the modern shape. Prettier auto-discovers prettier.config.{js,cjs,mjs} in the cwd, so the explicit --config ./prettier.config.cjs in lint-staged and the CI check was redundant — removed both.
1 parent 5a23ace commit 6d5f92f

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
node-version: 22
1616
- run: npm ci
1717
- name: Enforce code style
18-
run: npx prettier --config ./prettier.config.cjs --list-different "src/**/*.[jt]s" "tests/**/*.[jt]s" "src/**/*.vue"
18+
run: npx prettier --list-different "src/**/*.[jt]s" "tests/**/*.[jt]s" "src/**/*.vue"
1919
- name: Lint
2020
run: npm run lint
2121
- name: Tests

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"lint-staged": {
116116
"*.{js,jsx,ts,tsx,vue}": [
117117
"eslint",
118-
"prettier --config ./prettier.config.cjs --write"
118+
"prettier --write"
119119
]
120120
}
121121
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
printWidth: 80,
33
singleQuote: true,
44
trailingComma: 'es5',

0 commit comments

Comments
 (0)