Skip to content

Commit b54201f

Browse files
authored
chore: switch to oxfmt, oxlint - add ci checks (#3977)
1 parent 01b8dcf commit b54201f

326 files changed

Lines changed: 12781 additions & 14360 deletions

File tree

Some content is hidden

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

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
- any: ["**/*.md"]
1010

1111
"📌 area: ci":
12-
- any: [".github/**/*"]
12+
- any: [".github/**/*"]

.github/workflows/code-quality.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "🎨 Format & Lint"
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
code-quality:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: ⬇️ Checkout repo
15+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16+
with:
17+
fetch-depth: 0
18+
persist-credentials: false
19+
20+
- name: ⎔ Setup pnpm
21+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
22+
with:
23+
version: 10.33.2
24+
25+
- name: ⎔ Setup node
26+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
27+
with:
28+
node-version: 20.20.2
29+
cache: "pnpm"
30+
31+
- name: 📥 Download deps
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: 💅 Check formatting
35+
run: pnpm exec oxfmt --check .
36+
37+
- name: 🔎 Lint
38+
run: pnpm exec oxlint .

.github/workflows/dependabot-critical-alerts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Dependabot Critical Alerts
22

33
on:
44
schedule:
5-
- cron: "0 8 * * *" # Daily 08:00 UTC
5+
- cron: "0 8 * * *" # Daily 08:00 UTC
66
workflow_dispatch:
77
inputs:
88
severity:

.github/workflows/dependabot-weekly-summary.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Dependabot Weekly Summary
22

33
on:
44
schedule:
5-
- cron: "0 8 * * 1" # Mon 08:00 UTC
5+
- cron: "0 8 * * 1" # Mon 08:00 UTC
66
workflow_dispatch:
77

88
# Single-purpose monitoring workflow; serialise on workflow name only - we never
@@ -12,9 +12,9 @@ concurrency:
1212
cancel-in-progress: false
1313

1414
permissions:
15-
contents: read # gh CLI baseline
16-
pull-requests: read # gh pr list (open dependabot PRs)
17-
actions: read # gh run list / view (parse latest dependabot run logs)
15+
contents: read # gh CLI baseline
16+
pull-requests: read # gh pr list (open dependabot PRs)
17+
actions: read # gh run list / view (parse latest dependabot run logs)
1818

1919
jobs:
2020
summary:

.github/workflows/pr_checks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ jobs:
102102
- 'pnpm-workspace.yaml'
103103
- 'turbo.json'
104104
105+
code-quality:
106+
needs: changes
107+
if: needs.changes.outputs.code == 'true'
108+
uses: ./.github/workflows/code-quality.yml
109+
105110
typecheck:
106111
needs: changes
107112
if: needs.changes.outputs.code == 'true' || needs.changes.outputs.typecheck_self == 'true'
@@ -155,6 +160,7 @@ jobs:
155160
name: All PR Checks
156161
needs:
157162
- changes
163+
- code-quality
158164
- typecheck
159165
- webapp
160166
- e2e-webapp

.github/workflows/release-helm.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ name: 🧭 Helm Chart Release
33
on:
44
push:
55
tags:
6-
- 'helm-v*'
6+
- "helm-v*"
77
workflow_call:
88
inputs:
99
chart_version:
10-
description: 'Chart version to release'
10+
description: "Chart version to release"
1111
required: true
1212
type: string
1313
workflow_dispatch:
1414
inputs:
1515
chart_version:
16-
description: 'Chart version to release'
16+
description: "Chart version to release"
1717
required: true
1818
type: string
1919

@@ -58,7 +58,7 @@ jobs:
5858
- name: Validate manifests
5959
uses: docker://ghcr.io/yannh/kubeconform:v0.7.0@sha256:85dbef6b4b312b99133decc9c6fc9495e9fc5f92293d4ff3b7e1b30f5611823c
6060
with:
61-
entrypoint: '/kubeconform'
61+
entrypoint: "/kubeconform"
6262
args: "-summary -output json ./helm-output"
6363

6464
release:
@@ -134,7 +134,7 @@ jobs:
134134
run: |
135135
VERSION="${STEPS_VERSION_OUTPUTS_VERSION}"
136136
CHART_PACKAGE="/tmp/${{ env.CHART_NAME }}-${VERSION}.tgz"
137-
137+
138138
# Push to GHCR OCI registry
139139
helm push "$CHART_PACKAGE" "oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts"
140140
env:
@@ -153,7 +153,7 @@ jobs:
153153
oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts/${{ env.CHART_NAME }} \
154154
--version "${{ steps.version.outputs.version }}"
155155
```
156-
156+
157157
### Changes
158158
See commit history for detailed changes in this release.
159159
files: |

.github/workflows/workflow-checks.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
push:
55
branches: [main]
66
paths:
7-
- '.github/workflows/**'
8-
- '.github/actions/**'
9-
- '.github/zizmor.yml'
7+
- ".github/workflows/**"
8+
- ".github/actions/**"
9+
- ".github/zizmor.yml"
1010
pull_request:
1111
paths:
12-
- '.github/workflows/**'
13-
- '.github/actions/**'
14-
- '.github/zizmor.yml'
12+
- ".github/workflows/**"
13+
- ".github/actions/**"
14+
- ".github/zizmor.yml"
1515

1616
permissions: {}
1717

.github/zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ rules:
22
unpinned-uses:
33
config:
44
policies:
5-
'*': hash-pin
5+
"*": hash-pin

.oxfmtrc.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"semi": true,
4+
"singleQuote": false,
5+
"jsxSingleQuote": false,
6+
"trailingComma": "es5",
7+
"bracketSpacing": true,
8+
"bracketSameLine": false,
9+
"printWidth": 100,
10+
"tabWidth": 2,
11+
"useTabs": false,
12+
"sortPackageJson": false,
13+
"ignorePatterns": [
14+
"node_modules",
15+
"apps/webapp",
16+
".env",
17+
".env.local",
18+
"pnpm-lock.yaml",
19+
"tailwind.css",
20+
".babelrc.json",
21+
"**/.react-email/",
22+
"**/storybook-static/",
23+
"**/.changeset/",
24+
"**/dist/",
25+
"internal-packages/tsql/src/grammar/",
26+
// Maybe turn these on in the future
27+
"**/*.yaml",
28+
"**/*.mdx",
29+
"**/*.md"
30+
]
31+
}

0 commit comments

Comments
 (0)