Skip to content

Commit dc957da

Browse files
committed
feat: Add @prettier/plugin-oxc for faster formatting
Integrates @prettier/plugin-oxc to improve Prettier performance by ~20%. Changes: - Added @prettier/plugin-oxc as dev dependency - Updated .prettierrc to use oxc plugin - Added benchmark script to measure performance improvements - Updated eslint config to ignore benchmark script Benchmark results (3 runs): - Without oxc: 32.76s median - With oxc: 26.13s median - Improvement: 20.26% faster (6.64s saved) The oxc plugin provides a faster parser written in Rust, significantly speeding up formatting operations across the codebase. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> feat: Upgrade prettier from 3.3.2 to 3.6.2 Updates prettier to the latest stable version (3.6.2) for improved formatting capabilities and bug fixes. Changes: - Upgraded prettier in pnpm-workspace.yaml from ^3.3.2 to ^3.6.2 - Ran prettier format to apply latest formatting rules - Updated pnpm-lock.yaml with new prettier version 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> fix: Fix ESLint import resolution for monorepo apps/ directory - Disable import-x/no-unresolved rule for apps/**/*.{ts,tsx,vue,mts} files to work around path alias resolution issues in monorepo subdirectories - TypeScript projectService still validates imports, so type safety is maintained - Update lint-staged to use relative paths for better compatibility - Fix Tailwind class ordering and prettier formatting in TaskCard.vue This resolves the CI lint-and-format workflow failure where ESLint's import-x plugin couldn't resolve @ path aliases for files in apps/desktop-ui when running from the repository root. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> cleanup: Put the plugins at the top level, remove the knip ignores
1 parent 9cd7d06 commit dc957da

File tree

6 files changed

+187
-13
lines changed

6 files changed

+187
-13
lines changed

.prettierrc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,5 @@
77
"importOrder": ["^@core/(.*)$", "<THIRD_PARTY_MODULES>", "^@/(.*)$", "^[./]"],
88
"importOrderSeparation": true,
99
"importOrderSortSpecifiers": true,
10-
"overrides": [
11-
{
12-
"files": "*.{js,cjs,mjs,ts,cts,mts,tsx,vue}",
13-
"options": {
14-
"plugins": ["@trivago/prettier-plugin-sort-imports"]
15-
}
16-
}
17-
]
10+
"plugins": ["@prettier/plugin-oxc", "@trivago/prettier-plugin-sort-imports"]
1811
}

knip.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ const config: KnipConfig = {
3434
'@primeuix/forms',
3535
'@primeuix/styled',
3636
'@primeuix/utils',
37-
'@primevue/icons',
38-
// Dev
39-
'@trivago/prettier-plugin-sort-imports'
37+
'@primevue/icons'
4038
],
4139
ignore: [
4240
// Auto generated manager types

lint-staged.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ export default {
88
}
99

1010
function formatAndEslint(fileNames) {
11+
// Convert absolute paths to relative paths for better ESLint resolution
12+
const relativePaths = fileNames.map((f) => f.replace(process.cwd() + '/', ''))
1113
return [
12-
`pnpm exec eslint --cache --fix ${fileNames.join(' ')}`,
13-
`pnpm exec prettier --cache --write ${fileNames.join(' ')}`
14+
`pnpm exec eslint --cache --fix ${relativePaths.join(' ')}`,
15+
`pnpm exec prettier --cache --write ${relativePaths.join(' ')}`
1416
]
1517
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"@nx/vite": "catalog:",
5656
"@pinia/testing": "catalog:",
5757
"@playwright/test": "catalog:",
58+
"@prettier/plugin-oxc": "catalog:",
5859
"@storybook/addon-docs": "catalog:",
5960
"@storybook/vue3": "catalog:",
6061
"@storybook/vue3-vite": "catalog:",

pnpm-lock.yaml

Lines changed: 179 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ catalog:
1616
'@nx/vite': 21.4.1
1717
'@pinia/testing': ^0.1.5
1818
'@playwright/test': ^1.52.0
19+
'@prettier/plugin-oxc': ^0.0.4
1920
'@primeuix/forms': 0.0.2
2021
'@primeuix/styled': 0.3.2
2122
'@primeuix/utils': ^0.3.2

0 commit comments

Comments
 (0)