-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore: switch to oxfmt, oxlint - add ci checks #3977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
carderne
wants to merge
9
commits into
main
Choose a base branch
from
oxfmt-oxlint
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bb6ece7
chore: switch to oxfmt, oxlint - add ci checks
carderne c785779
ignore rules-of-hooks
carderne 92682d3
make actionlint happy
carderne 31bc39e
enforce checks in ci
carderne 1f64487
remove prettier
carderne 8bf1e42
remove lefthook
carderne bdf1045
ignore generated antlr files
carderne 0cb9877
update configs
carderne 6c5c6eb
lint + format
carderne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,4 +9,4 @@ | |
| - any: ["**/*.md"] | ||
|
|
||
| "📌 area: ci": | ||
| - any: [".github/**/*"] | ||
| - any: [".github/**/*"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: "🎨 Format & Lint" | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| code-quality: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: ⬇️ Checkout repo | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: ⎔ Setup pnpm | ||
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | ||
| with: | ||
| version: 10.33.2 | ||
|
|
||
| - name: ⎔ Setup node | ||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: 20.20.2 | ||
| cache: "pnpm" | ||
|
|
||
| - name: 📥 Download deps | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: 💅 Check formatting | ||
| run: pnpm exec oxfmt --check . | ||
|
|
||
| - name: 🔎 Lint | ||
| run: pnpm exec oxlint . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,4 @@ rules: | |
| unpinned-uses: | ||
| config: | ||
| policies: | ||
| '*': hash-pin | ||
| "*": hash-pin | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "$schema": "./node_modules/oxfmt/configuration_schema.json", | ||
| "semi": true, | ||
| "singleQuote": false, | ||
| "jsxSingleQuote": false, | ||
| "trailingComma": "es5", | ||
| "bracketSpacing": true, | ||
| "bracketSameLine": false, | ||
| "printWidth": 100, | ||
| "tabWidth": 2, | ||
| "useTabs": false, | ||
| "sortPackageJson": false, | ||
| "ignorePatterns": [ | ||
| "node_modules", | ||
| ".env", | ||
| ".env.local", | ||
| "pnpm-lock.yaml", | ||
| "tailwind.css", | ||
| ".babelrc.json", | ||
| "**/.react-email/", | ||
| "**/storybook-static/", | ||
| "**/.changeset/", | ||
| "**/dist/", | ||
| "internal-packages/tsql/src/grammar/", | ||
| // Maybe turn these on in the future | ||
| "**/*.yaml", | ||
| "**/*.mdx", | ||
| "**/*.md" | ||
| ] | ||
| } | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "plugins": ["typescript", "import", "react"], | ||
| "ignorePatterns": [ | ||
| "**/dist/**", | ||
| "**/build/**", | ||
| "**/*.d.ts", | ||
| "**/seed.js", | ||
| "**/seedCloud.ts", | ||
| "**/populate.js" | ||
| ], | ||
| // All rules below are disabled because they currently fire on the existing | ||
| // codebase (1748 warnings across these 20 rules as of this commit). Disabled | ||
| // to keep the lint baseline green; re-enable and fix incrementally. | ||
| "rules": { | ||
| // eslint | ||
| "no-unused-vars": "off", | ||
| "no-unused-expressions": "off", | ||
| "no-control-regex": "off", | ||
| "no-empty-pattern": "off", | ||
| "no-unused-private-class-members": "off", | ||
| "no-useless-catch": "off", | ||
| "no-unsafe-optional-chaining": "off", | ||
| "no-unreachable": "off", | ||
| "require-yield": "off", | ||
| "no-async-promise-executor": "off", | ||
| "no-unsafe-finally": "off", | ||
| "no-useless-escape": "off", | ||
| // typescript | ||
| "typescript/consistent-type-imports": "off", | ||
| "typescript/no-this-alias": "off", | ||
| "typescript/no-non-null-asserted-optional-chain": "off", | ||
| "typescript/no-unnecessary-parameter-property-assignment": "off", | ||
| // import | ||
| "import/no-duplicates": "off", | ||
| "import/namespace": "off", | ||
| // react | ||
| "react/jsx-key": "off", | ||
| "react/no-children-prop": "off", | ||
| // react-hooks | ||
| "react-hooks/exhaustive-deps": "off", | ||
| // oxlint treats any use*()/use() call as a React hook, producing false | ||
| // positives in async/test code (testcontainers, cli-v3 e2e). | ||
| "react-hooks/rules-of-hooks": "off" | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,4 +27,4 @@ | |
| "esbuild": "^0.19.11", | ||
| "tsx": "^4.7.0" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,4 +24,4 @@ | |
| "esbuild": "^0.19.11", | ||
| "tsx": "^4.7.0" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,4 +25,4 @@ | |
| "esbuild": "^0.19.11", | ||
| "tsx": "^4.7.0" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.