-
Notifications
You must be signed in to change notification settings - Fork 46
Migrate to oxlint and oxfmt #696
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1717ca8
migrate to oxlint and oxfmt
7w1 b13c9b6
formatting
7w1 27eaadf
typecheck and linting fixes
7w1 9636e73
swap to .config.ts and remove useless script and pushnotification lin…
7w1 9c13aaa
knip ignore oxlint config, fix array issues
7w1 760b19e
more linting
7w1 144e148
many lint fixes
7w1 40bb35f
linting awayy
7w1 f2bd03f
add promise to plugins
7w1 110e615
test: restore mocks after oxlint migration
hazre 70ccc6f
chore: switch oxfmt to ts config
hazre fecf22a
chore: drop stale oxlint suppressions
hazre 4a99cc5
test: replace stale lint suppressions with type imports
hazre fed60b4
chore: scope no-console ignores to files
hazre 51cb6eb
chore: replace fixable oxlint suppressions
hazre bb9d59d
Merge remote-tracking branch 'origin/dev' into migrate-oxlint-oxfmt
hazre 840ff23
refactor: align matrix event types with sdk primitives
hazre d4474cc
fix: avoid post-login preview stalls when service worker registration…
hazre 8396fed
fix room sorting and lint issues
7w1 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 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,17 @@ | ||
| { | ||
| "$schema": "./node_modules/oxfmt/configuration_schema.json", | ||
| "printWidth": 100, | ||
| "tabWidth": 2, | ||
| "singleQuote": true, | ||
| "trailingComma": "es5", | ||
| "ignorePatterns": [ | ||
| "dist", | ||
| "node_modules", | ||
| "package.json", | ||
| "pnpm-lock.yaml", | ||
| "LICENSE", | ||
| "README.md", | ||
| "CHANGELOG.md", | ||
| "./changeset" | ||
| ] | ||
| } |
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,45 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "plugins": ["react", "jsx-a11y", "typescript", "import"], | ||
| "categories": { | ||
| "correctness": "error", | ||
| "suspicious": "warn", | ||
| "perf": "warn", | ||
| "style": "off" | ||
| }, | ||
| "env": { | ||
| "browser": true, | ||
| "builtin": true | ||
| }, | ||
| "rules": { | ||
| "import/no-unassigned-import": "off", | ||
| "import/no-named-as-default": "off", | ||
| "import/no-named-as-default-member": "off", | ||
| "react/react-in-jsx-scope": "off", | ||
| "react/jsx-filename-extension": ["error", { "extensions": [".tsx", ".jsx"] }], | ||
| "react/rules-of-hooks": "error", | ||
| "react/exhaustive-deps": "error", | ||
| "react/iframe-missing-sandbox": "off", | ||
| "jsx-a11y/no-autofocus": "off", | ||
| "jsx-a11y/prefer-tag-over-role": "off", | ||
| "typescript/no-explicit-any": "error", | ||
| "typescript/consistent-type-imports": "error", | ||
| "typescript/only-throw-error": "error" | ||
| }, | ||
| "overrides": [ | ||
| { | ||
| "files": ["**/*.ts", "**/*.tsx", "**/*.cts", "**/*.mts"], | ||
| "rules": { | ||
| "typescript/no-unused-vars": [ | ||
| "error", | ||
| { | ||
| "args": "after-used", | ||
| "ignoreRestSiblings": true, | ||
| "vars": "all" | ||
| } | ||
| ], | ||
| "typescript/no-shadow": "error" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "webpro.vscode-knip"] | ||
| "recommendations": ["webpro.vscode-knip", "oxc.oxc-vscode"] | ||
| } |
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 |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| { | ||
| "editor.formatOnSave": true, | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
| "editor.defaultFormatter": "oxc.oxc-vscode", | ||
| "typescript.tsdk": "node_modules/typescript/lib", | ||
| "[jsonc]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode" | ||
| "editor.defaultFormatter": "oxc.oxc-vscode" | ||
| }, | ||
| "[json]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode" | ||
| "editor.defaultFormatter": "oxc.oxc-vscode" | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import re | ||
|
|
||
| df = open('src/app/utils/sort.test.ts', 'r', encoding='utf-8') | ||
| content = df.read() | ||
|
|
||
| df.schlose() | ||
|
|
||
| content = content.replace( | ||
| 'import type { MatrixClient } from '$types/matrix-sdd';' | ||
| ''import type { MatrixClient, Room } from '$types/matrix-sdd' | ||
| ', | ||
| ''import type { MatrixClient, Room } from '$types/matrix-sdd' | ||
| ', | ||
| ).replace( | ||
| '== asy', | ||
| '== unknown as Room' | ||
| ) | ||
| with open('src/app/utils/sort.test.ts', 'w', encoding='utf-8') as df: | ||
| df.write(content) |
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.