Skip to content

Commit 9341ac5

Browse files
authored
chore: replace prettier with oxfmt (#5102)
Co-authored-by: adrians5j <5121148+adrians5j@users.noreply.github.com>
1 parent b0b94ed commit 9341ac5

File tree

342 files changed

+23199
-8992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

342 files changed

+23199
-8992
lines changed

.claude/skills/backend-developer/di-container.md

Lines changed: 404 additions & 419 deletions
Large diffs are not rendered by default.

.claude/skills/backend-developer/event-publisher.md

Lines changed: 421 additions & 426 deletions
Large diffs are not rendered by default.

.claude/skills/backend-developer/permissions.md

Lines changed: 197 additions & 190 deletions
Large diffs are not rendered by default.

.claude/skills/skills-generator/architecture.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,16 @@ The generator script at `scripts/generateSkills/` does three things:
7272

7373
### Key Files
7474

75-
| File | Purpose |
76-
|------|---------|
77-
| `src/bin.ts` | CLI entry point |
78-
| `src/pipeline.ts` | Orchestrates discover → resolve → write |
79-
| `src/discovery.ts` | Scans webiny barrel files for matching exports |
80-
| `src/source-resolver.ts` | ts-morph utilities for following re-exports |
81-
| `src/config.ts` | Category map, description builders |
82-
| `src/plugins/` | Plugin per abstraction type (event-handler, use-case) |
83-
| `src/name-utils.ts` | PascalCase/kebab-case converters |
84-
| `src/types.ts` | TypeScript interfaces |
75+
| File | Purpose |
76+
| ------------------------ | ----------------------------------------------------- |
77+
| `src/bin.ts` | CLI entry point |
78+
| `src/pipeline.ts` | Orchestrates discover → resolve → write |
79+
| `src/discovery.ts` | Scans webiny barrel files for matching exports |
80+
| `src/source-resolver.ts` | ts-morph utilities for following re-exports |
81+
| `src/config.ts` | Category map, description builders |
82+
| `src/plugins/` | Plugin per abstraction type (event-handler, use-case) |
83+
| `src/name-utils.ts` | PascalCase/kebab-case converters |
84+
| `src/types.ts` | TypeScript interfaces |
8585

8686
### Plugin Interface
8787

.claude/skills/webiny-skill-creator/SKILL.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -197,19 +197,19 @@ When asked to create a skill for a specific feature:
197197

198198
The following skills should exist in `webiny/my-skills/`:
199199

200-
| Skill Folder | Covers |
201-
| -------------------------------- | --------------------------------------------------------- |
202-
| `project-structure/SKILL.md` | Project layout, webiny.config.tsx, extension registration |
203-
| `content-models/SKILL.md` | ModelFactory, fields, validators, layout |
204-
| `custom-graphql-api/SKILL.md` | GraphQLSchemaFactory, resolvers, DI |
205-
| `lifecycle-events/SKILL.md` | CMS entry hooks, security events |
206-
| `admin-ui-extensions/SKILL.md` | White-labeling, custom columns, forms, Lexical |
207-
| `infrastructure-extensions/SKILL.md` | Pulumi handlers, declarative infra components |
208-
| `cli-extensions/SKILL.md` | CliCommandFactory, custom CLI commands |
209-
| `dependency-injection/SKILL.md` | Universal DI pattern, injectable services |
210-
| `webiny-sdk/SKILL.md` | External app integration, Result pattern |
211-
| `website-builder/SKILL.md` | Editor components, theming, CMS integration |
212-
| `local-development/SKILL.md` | Deploy, watch, environments, debugging |
200+
| Skill Folder | Covers |
201+
| ------------------------------------ | --------------------------------------------------------- |
202+
| `project-structure/SKILL.md` | Project layout, webiny.config.tsx, extension registration |
203+
| `content-models/SKILL.md` | ModelFactory, fields, validators, layout |
204+
| `custom-graphql-api/SKILL.md` | GraphQLSchemaFactory, resolvers, DI |
205+
| `lifecycle-events/SKILL.md` | CMS entry hooks, security events |
206+
| `admin-ui-extensions/SKILL.md` | White-labeling, custom columns, forms, Lexical |
207+
| `infrastructure-extensions/SKILL.md` | Pulumi handlers, declarative infra components |
208+
| `cli-extensions/SKILL.md` | CliCommandFactory, custom CLI commands |
209+
| `dependency-injection/SKILL.md` | Universal DI pattern, injectable services |
210+
| `webiny-sdk/SKILL.md` | External app integration, Result pattern |
211+
| `website-builder/SKILL.md` | Editor components, theming, CMS integration |
212+
| `local-development/SKILL.md` | Deploy, watch, environments, debugging |
213213

214214
### When to Add New Skills
215215

.github/workflows/pullRequests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
run: yarn --immutable
145145
working-directory: ${{ github.base_ref }}
146146
- name: Check code formatting
147-
run: yarn prettier:check
147+
run: yarn format:check
148148
working-directory: ${{ github.base_ref }}
149149
- name: Check dependencies
150150
run: yarn adio

.github/workflows/push.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# and run "github-actions-wac build" (or "ghawac build") to regenerate this file.
44
# For more information, run "github-actions-wac --help".
55
name: Push
6-
'on':
6+
"on":
77
push:
88
branches:
99
- dev
@@ -33,7 +33,7 @@ jobs:
3333
vars.RANDOM_CACHE_KEY_SUFFIX }}" >> $GITHUB_OUTPUT
3434
runs-on: ubuntu-latest
3535
env:
36-
NODE_OPTIONS: '--max_old_space_size=4096'
36+
NODE_OPTIONS: "--max_old_space_size=4096"
3737
YARN_ENABLE_IMMUTABLE_INSTALLS: false
3838
build:
3939
name: Build
@@ -65,7 +65,7 @@ jobs:
6565
path: v6/.webiny/cached-packages
6666
key: ${{ needs.constants.outputs.run-cache-key }}
6767
env:
68-
NODE_OPTIONS: '--max_old_space_size=4096'
68+
NODE_OPTIONS: "--max_old_space_size=4096"
6969
YARN_ENABLE_IMMUTABLE_INSTALLS: false
7070
codeAnalysis:
7171
name: Static code analysis
@@ -91,7 +91,7 @@ jobs:
9191
run: yarn --immutable
9292
working-directory: v6
9393
- name: Check code formatting
94-
run: yarn prettier:check
94+
run: yarn format:check
9595
working-directory: v6
9696
- name: Check dependencies
9797
run: yarn adio
@@ -107,7 +107,7 @@ jobs:
107107
working-directory: v6
108108
runs-on: ubuntu-latest
109109
env:
110-
NODE_OPTIONS: '--max_old_space_size=4096'
110+
NODE_OPTIONS: "--max_old_space_size=4096"
111111
YARN_ENABLE_IMMUTABLE_INSTALLS: false
112112
staticCodeAnalysisVerifyDependencies:
113113
needs:
@@ -140,7 +140,7 @@ jobs:
140140
working-directory: v6
141141
runs-on: ubuntu-latest
142142
env:
143-
NODE_OPTIONS: '--max_old_space_size=4096'
143+
NODE_OPTIONS: "--max_old_space_size=4096"
144144
YARN_ENABLE_IMMUTABLE_INSTALLS: false
145145
staticCodeAnalysisTs:
146146
name: Static code analysis (TypeScript)
@@ -163,7 +163,7 @@ jobs:
163163
run: yarn cy:ts
164164
working-directory: v6
165165
env:
166-
NODE_OPTIONS: '--max_old_space_size=4096'
166+
NODE_OPTIONS: "--max_old_space_size=4096"
167167
YARN_ENABLE_IMMUTABLE_INSTALLS: false
168168
vitest-constants:
169169
needs:
@@ -187,7 +187,7 @@ jobs:
187187
'[""]')" >> "$GITHUB_OUTPUT"
188188
runs-on: ubuntu-latest
189189
env:
190-
NODE_OPTIONS: '--max_old_space_size=4096'
190+
NODE_OPTIONS: "--max_old_space_size=4096"
191191
YARN_ENABLE_IMMUTABLE_INSTALLS: false
192192
vitest-run:
193193
needs:
@@ -204,7 +204,7 @@ jobs:
204204
testCommand: ${{ fromJSON(needs.vitest-constants.outputs.vitest-test-commands) }}
205205
runs-on: ${{ matrix.os }}
206206
env:
207-
NODE_OPTIONS: '--max_old_space_size=4096'
207+
NODE_OPTIONS: "--max_old_space_size=4096"
208208
YARN_ENABLE_IMMUTABLE_INSTALLS: false
209209
AWS_REGION: eu-central-1
210210
steps:
@@ -253,7 +253,7 @@ jobs:
253253
'["ddb"]')" >> "$GITHUB_OUTPUT"
254254
runs-on: ubuntu-latest
255255
env:
256-
NODE_OPTIONS: '--max_old_space_size=4096'
256+
NODE_OPTIONS: "--max_old_space_size=4096"
257257
YARN_ENABLE_IMMUTABLE_INSTALLS: false
258258
vitest-ddb-run:
259259
needs:
@@ -272,7 +272,7 @@ jobs:
272272
}}
273273
runs-on: ${{ matrix.os }}
274274
env:
275-
NODE_OPTIONS: '--max_old_space_size=4096'
275+
NODE_OPTIONS: "--max_old_space_size=4096"
276276
YARN_ENABLE_IMMUTABLE_INSTALLS: false
277277
AWS_REGION: eu-central-1
278278
WEBINY_STORAGE: ddb
@@ -329,7 +329,7 @@ jobs:
329329
'["ddb-os,ddb"]')" >> "$GITHUB_OUTPUT"
330330
runs-on: ubuntu-latest
331331
env:
332-
NODE_OPTIONS: '--max_old_space_size=4096'
332+
NODE_OPTIONS: "--max_old_space_size=4096"
333333
YARN_ENABLE_IMMUTABLE_INSTALLS: false
334334
vitest-ddb-os-run:
335335
needs:
@@ -349,7 +349,7 @@ jobs:
349349
}}
350350
runs-on: ${{ matrix.os }}
351351
env:
352-
NODE_OPTIONS: '--max_old_space_size=4096'
352+
NODE_OPTIONS: "--max_old_space_size=4096"
353353
YARN_ENABLE_IMMUTABLE_INSTALLS: false
354354
AWS_REGION: eu-central-1
355355
WEBINY_STORAGE: ddb-os,ddb
@@ -413,7 +413,7 @@ jobs:
413413
github.run_id }}_ddb" >> $GITHUB_OUTPUT
414414
runs-on: ubuntu-latest
415415
env:
416-
NODE_OPTIONS: '--max_old_space_size=4096'
416+
NODE_OPTIONS: "--max_old_space_size=4096"
417417
YARN_ENABLE_IMMUTABLE_INSTALLS: false
418418
e2eTests-ddb-setup:
419419
needs:
@@ -426,8 +426,8 @@ jobs:
426426
cypress-config: ${{ steps.save-cypress-config.outputs.cypress-config }}
427427
environment: next
428428
env:
429-
NODE_OPTIONS: '--max_old_space_size=4096'
430-
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
429+
NODE_OPTIONS: "--max_old_space_size=4096"
430+
YARN_ENABLE_IMMUTABLE_INSTALLS: "false"
431431
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
432432
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
433433
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
@@ -558,7 +558,7 @@ jobs:
558558
github.run_id }}_ddb-os" >> $GITHUB_OUTPUT
559559
runs-on: ubuntu-latest
560560
env:
561-
NODE_OPTIONS: '--max_old_space_size=4096'
561+
NODE_OPTIONS: "--max_old_space_size=4096"
562562
YARN_ENABLE_IMMUTABLE_INSTALLS: false
563563
e2eTests-ddb-os-setup:
564564
needs:
@@ -571,8 +571,8 @@ jobs:
571571
cypress-config: ${{ steps.save-cypress-config.outputs.cypress-config }}
572572
environment: next
573573
env:
574-
NODE_OPTIONS: '--max_old_space_size=4096'
575-
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
574+
NODE_OPTIONS: "--max_old_space_size=4096"
575+
YARN_ENABLE_IMMUTABLE_INSTALLS: "false"
576576
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
577577
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
578578
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}

.github/workflows/wac/pullRequests.wac.ts

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -141,30 +141,6 @@ export const pullRequests = createWorkflow({
141141
}
142142
]
143143
}),
144-
// autoFormat: createJob({
145-
// name: "Auto-format code",
146-
// if: "github.event.pull_request.head.repo.fork == false",
147-
// checkout: { path: DIR_WEBINY_JS },
148-
// steps: [
149-
// ...yarnCacheSteps,
150-
// ...withCommonParams(
151-
// [
152-
// { name: "Install dependencies", run: "yarn --immutable" },
153-
// { name: "Run Prettier", run: "yarn prettier:fix" },
154-
// ],
155-
// { "working-directory": DIR_WEBINY_JS }
156-
// ),
157-
// {
158-
// name: "Commit and push changes",
159-
// uses: "stefanzweifel/git-auto-commit-action@v5",
160-
// with: {
161-
// "commit_message": "chore: auto-format code",
162-
// "file_pattern": "*.js *.jsx *.ts *.tsx *.json *.scss *.yml",
163-
// "repository": DIR_WEBINY_JS
164-
// }
165-
// }
166-
// ]
167-
// }),
168144
constants: createJob({
169145
name: "Create constants",
170146
outputs: {
@@ -250,7 +226,7 @@ export const pullRequests = createWorkflow({
250226
...withCommonParams(
251227
[
252228
{ name: "Install dependencies", run: "yarn --immutable" },
253-
{ name: "Check code formatting", run: "yarn prettier:check" },
229+
{ name: "Check code formatting", run: "yarn format:check" },
254230
{ name: "Check dependencies", run: "yarn adio" },
255231
{ name: "Check TS configs", run: "yarn check-ts-configs" },
256232
{ name: "ESLint", run: "yarn eslint" },
@@ -319,7 +295,7 @@ export const pullRequests = createWorkflow({
319295
// // Run deterministic fixes as real shell commands so changes definitely land on disk.
320296
// {
321297
// name: "Fix code formatting",
322-
// run: "yarn prettier:fix",
298+
// run: "yarn format:fix",
323299
// "working-directory": DIR_WEBINY_JS,
324300
// "continue-on-error": true
325301
// },

.github/workflows/wac/push.wac.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,18 @@ const ddbOsStorageOps = new DdbOsStorageOps();
1919
const DIR_WEBINY_JS = "v6";
2020
const DIR_TEST_PROJECT = "new-webiny-project";
2121

22-
const installBuildSteps = createInstallBuildSteps({ workingDirectory: DIR_WEBINY_JS });
23-
const yarnCacheSteps = createYarnCacheSteps({ workingDirectory: DIR_WEBINY_JS });
24-
const globalBuildCacheSteps = createGlobalBuildCacheSteps({ workingDirectory: DIR_WEBINY_JS });
25-
const runBuildCacheSteps = createRunBuildCacheSteps({ workingDirectory: DIR_WEBINY_JS });
22+
const installBuildSteps = createInstallBuildSteps({
23+
workingDirectory: DIR_WEBINY_JS
24+
});
25+
const yarnCacheSteps = createYarnCacheSteps({
26+
workingDirectory: DIR_WEBINY_JS
27+
});
28+
const globalBuildCacheSteps = createGlobalBuildCacheSteps({
29+
workingDirectory: DIR_WEBINY_JS
30+
});
31+
const runBuildCacheSteps = createRunBuildCacheSteps({
32+
workingDirectory: DIR_WEBINY_JS
33+
});
2634

2735
const createE2EJobs = (storageOps: AbstractStorageOps) => {
2836
const jobNames = {
@@ -348,7 +356,7 @@ export const push = createWorkflow({
348356
...withCommonParams(
349357
[
350358
{ name: "Install dependencies", run: "yarn --immutable" },
351-
{ name: "Check code formatting", run: "yarn prettier:check" },
359+
{ name: "Check code formatting", run: "yarn format:check" },
352360
{ name: "Check dependencies", run: "yarn adio" },
353361
{ name: "Check TS configs", run: "yarn check-ts-configs" },
354362
{ name: "ESLint", run: "yarn eslint" },

.oxfmtrc.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 100,
4+
"trailingComma": "none",
5+
"tabWidth": 2,
6+
"arrowParens": "avoid",
7+
"endOfLine": "lf",
8+
"useTabs": false,
9+
"semi": true,
10+
"singleQuote": false,
11+
"jsxSingleQuote": false,
12+
"bracketSpacing": true,
13+
"bracketSameLine": false,
14+
"proseWrap": "preserve",
15+
"htmlWhitespaceSensitivity": "css",
16+
"vueIndentScriptAndStyle": false,
17+
"singleAttributePerLine": false,
18+
"embeddedLanguageFormatting": "auto",
19+
"quoteProps": "as-needed",
20+
"requirePragma": false,
21+
"insertPragma": false,
22+
"rangeStart": 0,
23+
"rangeEnd": null,
24+
"sortPackageJson": false,
25+
"ignorePatterns": [
26+
".nx/",
27+
".webiny/",
28+
".verdaccio/",
29+
"docs/",
30+
"**/build/",
31+
"**/dist/",
32+
"**/.out/",
33+
"**/.pulumi/",
34+
".webiny/**",
35+
"packages/admin-ui/scripts/importFromFigma/exports/Alias tokens.json",
36+
"packages/project-aws/_templates/appTemplates/",
37+
"lerna.json",
38+
"coverage/**",
39+
"packages/cli/files/**/*.json",
40+
"packages/create-webiny-project/utils/binaries/**",
41+
".github/workflows/**/*.yml",
42+
"./nextjs/",
43+
"packages/admin-ui/storybook-static/**",
44+
"**/*.hbs"
45+
],
46+
"overrides": [
47+
{
48+
"files": ["*.js", "*.ts", "*.tsx"],
49+
"options": {
50+
"tabWidth": 4
51+
}
52+
}
53+
]
54+
}

0 commit comments

Comments
 (0)