Skip to content

Commit deda60f

Browse files
authored
chore: simplify oxfmt patterns (#3994)
1 parent 910cca4 commit deda60f

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

.changeset/short-things-shake.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
export const DEFAULT_ENCODING = "utf-8";
2-
export const WITH_UTF8_ENCODING = { encoding: DEFAULT_ENCODING } as const;
1+
export const BIGINT_STATS_OPTIONS = { bigint: true } as const;
2+
export const BIGINT_STATS_SYNC_OPTIONS = {
3+
bigint: true,
4+
throwIfNoEntry: false,
5+
} as const;
6+
37
export const DEFAULT_DIR_MODE = 0o755; // rwxr-xr-x (read/write/execute for owner, read/execute for group and others)
8+
export const DEFAULT_ENCODING = "utf-8";
49
export const DEFAULT_FILE_MODE = 0o644; // rw-r--r-- (read/write for owner, read for group and others)
10+
511
export const MKDIR_P_OPTIONS = {
612
recursive: true,
713
mode: DEFAULT_DIR_MODE,
814
} as const;
9-
export const BIGINT_STATS_SYNC_OPTIONS = {
10-
bigint: true,
11-
throwIfNoEntry: false,
12-
} as const;
13-
export const BIGINT_STATS_OPTIONS = { bigint: true } as const;
15+
16+
export const WITH_UTF8_ENCODING = { encoding: DEFAULT_ENCODING } as const;

scripts/src/commands/format.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ export class FormatCommand extends Command {
1919
process.argv = [
2020
process.argv0,
2121
fileURLToPath(oxfmt),
22-
"**/*.{js,json,jsx,md,mjs,mts,ts,tsx,yml}",
23-
"!{CODE_OF_CONDUCT,SECURITY}.md",
24-
"!**/{#archived,__fixtures__,lib}/**",
25-
"!**/CHANGELOG.*",
22+
"*.{js,json,jsx,md,mjs,mts,ts,tsx,yml}",
23+
"!{#archived,__fixtures__,lib}",
24+
"!{CHANGELOG,CODE_OF_CONDUCT,SECURITY}.md",
2625
];
2726
await import(oxfmt);
2827
return 0;

0 commit comments

Comments
 (0)