Skip to content

Commit 2c9c1e3

Browse files
committed
refactor: use getRootPath helper in fix.mjs
Standardize path resolution using common utility
1 parent 91994a3 commit 2c9c1e3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scripts/fix.mjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
*/
44

55
import { spawn } from 'node:child_process'
6-
import path from 'node:path'
7-
import { fileURLToPath } from 'node:url'
86

9-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
10-
const rootPath = path.join(__dirname, '..')
7+
import { getRootPath } from './utils/common.mjs'
8+
9+
const rootPath = getRootPath(import.meta.url)
1110

1211
// Pass through to lint.mjs with --fix flag
1312
const args = ['run', 'lint', '--fix', ...process.argv.slice(2)]

0 commit comments

Comments
 (0)