Repository navigation
Replace deno lint with Oxlint
#1358
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
dahlia
wants to merge
28
commits into
fedify-dev:main
Choose a base branch
from
dahlia:chore/replace-deno-lint-with-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.
+6,304
−682
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
f565cea
Emit Oxlint suppressions from generated code
dahlia d17936d
Add an Oxlint configuration mirroring deno lint
dahlia d00db68
Run repository linting with Oxlint
dahlia b96c6a3
Warn on awaited operations inside loops
dahlia 0ca44c7
Keep directive audit independent of Git hooks
dahlia 2207c66
Warn on console calls outside the CLI
dahlia cc5bee3
Vendor anti-slop and enable its low-risk rules
dahlia 409c969
Recognize eslint directives in lint audit
dahlia 3cb41c7
Enable promise/no-nesting and fix upstream lint
dahlia c92b6ae
Enable promise/no-return-wrap
dahlia a88368d
Enable eslint/no-throw-literal
dahlia dbcf757
Enable eslint/no-unsafe-optional-chaining
dahlia fbec4d0
Enable eslint/no-self-compare
dahlia aad3c9e
Enable eslint/no-useless-escape
dahlia 2ded180
Enable unicorn/prefer-node-protocol
dahlia 2c5e43e
Enable unicorn/prefer-includes
dahlia 357151d
Enable unicorn/error-message
dahlia a624ff0
Sync Deno import maps with Oxlint 1.90.0
dahlia a73fe5a
Enable unicorn/no-array-for-each
dahlia 0b40ce3
Enable typescript/no-import-type-side-effects
dahlia f6d5681
Enable typescript/prefer-for-of
dahlia 73cc2de
Enable typescript/no-extraneous-class
dahlia 7e6f446
Add LogTape lint rules and align versions
dahlia f4006f4
Cover TypeScript getter returns in Oxlint
dahlia b3d4ba7
Assert formatted benchmark warning text
dahlia 7c65b08
Audit non-ASCII paths in lint directives
dahlia 091a156
Avoid leaking type substitutions into alias bodies
dahlia 2ca1294
Build lint plugin before Deno tests
dahlia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
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 |
|---|---|---|
| @@ -0,0 +1,249 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "plugins": [ | ||
| "typescript", | ||
| "react", | ||
| "unicorn", | ||
| "oxc", | ||
| "import", | ||
| "promise", | ||
| "vitest", | ||
| "jsx-a11y" | ||
| ], | ||
| "categories": { | ||
| "correctness": "off", | ||
| "suspicious": "off", | ||
| "pedantic": "off", | ||
| "perf": "off", | ||
| "style": "off", | ||
| "restriction": "off", | ||
| "nursery": "off" | ||
| }, | ||
| "options": { | ||
| "reportUnusedDisableDirectives": "error" | ||
| }, | ||
| "jsPlugins": [ | ||
| { | ||
| "name": "anti-slop", | ||
| "specifier": "./tools/oxlint/anti-slop/index.ts" | ||
| }, | ||
| { | ||
| "name": "@logtape", | ||
| "specifier": "@logtape/lint/eslint" | ||
| } | ||
| ], | ||
| "overrides": [ | ||
| { | ||
| "files": [ | ||
| "packages/cli/**" | ||
| ], | ||
| "rules": { | ||
| "eslint/no-console": "off" | ||
| } | ||
| }, | ||
| { | ||
| "files": [ | ||
| "examples/fresh/**" | ||
| ], | ||
| "rules": { | ||
| "react/no-danger": "error", | ||
| "react/no-danger-with-children": "error", | ||
| "react/rules-of-hooks": "error" | ||
| } | ||
| } | ||
| ], | ||
| "rules": { | ||
| "typescript/adjacent-overload-signatures": "error", | ||
| "typescript/ban-ts-comment": [ | ||
| "error", | ||
| { | ||
| "ts-check": false, | ||
| "ts-expect-error": "allow-with-description", | ||
| "ts-ignore": "allow-with-description", | ||
| "ts-nocheck": "allow-with-description", | ||
| "minimumDescriptionLength": 1 | ||
| } | ||
| ], | ||
| "typescript/no-wrapper-object-types": "error", | ||
| "typescript/no-unsafe-function-type": "error", | ||
| "eslint/constructor-super": "error", | ||
| "eslint/for-direction": "error", | ||
| "eslint/getter-return": "error", | ||
| "react/jsx-boolean-value": "error", | ||
| "react/button-has-type": "error", | ||
| "react/jsx-curly-brace-presence": [ | ||
| "error", | ||
| { | ||
| "propElementValues": "always" | ||
| } | ||
| ], | ||
| "react/jsx-key": [ | ||
| "error", | ||
| { | ||
| "checkKeyMustBeforeSpread": false | ||
| } | ||
| ], | ||
| "react/no-children-prop": "error", | ||
| "react/jsx-no-comment-textnodes": "error", | ||
| "react/jsx-no-duplicate-props": "error", | ||
| "react/no-unescaped-entities": "error", | ||
| "react/jsx-no-useless-fragment": "error", | ||
| "react/jsx-props-no-spread-multi": "error", | ||
| "react/void-dom-elements-no-children": "error", | ||
| "eslint/no-array-constructor": "error", | ||
| "eslint/no-async-promise-executor": "error", | ||
| "eslint/no-await-in-loop": "warn", | ||
| "eslint/no-case-declarations": "error", | ||
| "eslint/no-class-assign": "error", | ||
| "eslint/no-compare-neg-zero": "error", | ||
| "eslint/no-cond-assign": "error", | ||
| "eslint/no-console": "warn", | ||
| "eslint/no-const-assign": "error", | ||
| "eslint/no-constant-condition": [ | ||
| "error", | ||
| { | ||
| "checkLoops": false | ||
| } | ||
| ], | ||
| "eslint/no-control-regex": "error", | ||
| "eslint/no-debugger": "error", | ||
| "eslint/no-delete-var": "error", | ||
| "eslint/no-dupe-class-members": "error", | ||
| "eslint/no-dupe-else-if": "error", | ||
| "eslint/no-dupe-keys": "error", | ||
| "eslint/no-duplicate-case": "error", | ||
| "eslint/no-empty": "error", | ||
| "eslint/no-empty-character-class": "error", | ||
| "typescript/no-empty-interface": [ | ||
| "error", | ||
| { | ||
| "allowSingleExtends": true | ||
| } | ||
| ], | ||
| "typescript/no-empty-object-type": [ | ||
| "error", | ||
| { | ||
| "allowInterfaces": "always" | ||
| } | ||
| ], | ||
| "eslint/no-empty-pattern": "error", | ||
| "eslint/no-ex-assign": "error", | ||
| "typescript/no-explicit-any": "error", | ||
| "eslint/no-extra-boolean-cast": "error", | ||
| "typescript/no-extra-non-null-assertion": "error", | ||
| "eslint/no-fallthrough": "error", | ||
| "eslint/no-func-assign": "error", | ||
| "eslint/no-global-assign": "error", | ||
| "eslint/no-import-assign": "error", | ||
| "eslint/no-inner-declarations": "error", | ||
| "eslint/no-invalid-regexp": "error", | ||
| "eslint/no-irregular-whitespace": "error", | ||
| "typescript/no-misused-new": "error", | ||
| "typescript/no-namespace": "error", | ||
| "eslint/no-new-native-nonconstructor": "error", | ||
| "eslint/no-obj-calls": "error", | ||
| "eslint/no-prototype-builtins": "error", | ||
| "eslint/no-redeclare": "error", | ||
| "eslint/no-regex-spaces": "error", | ||
| "eslint/no-self-assign": "error", | ||
| "eslint/no-setter-return": "error", | ||
| "eslint/no-shadow-restricted-names": "error", | ||
| "typescript/no-this-alias": "error", | ||
| "eslint/no-this-before-super": "error", | ||
| "eslint/no-unreachable": "error", | ||
| "eslint/no-unsafe-finally": "error", | ||
| "eslint/no-unsafe-negation": "error", | ||
| "eslint/no-unused-labels": "error", | ||
| "eslint/no-unused-vars": [ | ||
| "error", | ||
| { | ||
| "args": "all", | ||
| "argsIgnorePattern": "^_", | ||
| "caughtErrors": "all", | ||
| "caughtErrorsIgnorePattern": "^_", | ||
| "destructuredArrayIgnorePattern": "^_", | ||
| "varsIgnorePattern": "^_" | ||
| } | ||
| ], | ||
| "eslint/no-var": "error", | ||
| "eslint/no-with": "error", | ||
| "typescript/prefer-as-const": "error", | ||
| "eslint/prefer-const": [ | ||
| "error", | ||
| { | ||
| "destructuring": "all" | ||
| } | ||
| ], | ||
| "typescript/prefer-namespace-keyword": "error", | ||
| "eslint/require-await": "error", | ||
| "eslint/require-yield": "error", | ||
| "eslint/use-isnan": "error", | ||
| "eslint/valid-typeof": "error", | ||
| "oxc/no-accumulating-spread": "error", | ||
| "anti-slop/no-module-mocking": "error", | ||
| "anti-slop/no-reduce-accumulator-copy": "error", | ||
| "anti-slop/no-unknown-type-aliases": "error", | ||
| "anti-slop/no-widen-then-assert": "error", | ||
| "anti-slop/no-array-filter-map": "error", | ||
| "anti-slop/no-reflect-get": "error", | ||
| "anti-slop/no-reflect-apply": "error", | ||
| "import/no-duplicates": "error", | ||
| "promise/no-nesting": "error", | ||
| "promise/no-return-wrap": "error", | ||
| "eslint/no-throw-literal": "error", | ||
| "eslint/no-unsafe-optional-chaining": "error", | ||
| "eslint/no-self-compare": "error", | ||
| "eslint/no-useless-escape": "error", | ||
| "unicorn/prefer-node-protocol": "error", | ||
| "unicorn/prefer-includes": "error", | ||
| "unicorn/error-message": "error", | ||
| "unicorn/no-array-for-each": "error", | ||
| "typescript/no-import-type-side-effects": "error", | ||
| "typescript/prefer-for-of": "error", | ||
| "typescript/no-extraneous-class": "error", | ||
| "@logtape/no-message-interpolation": "error", | ||
| "@logtape/prefer-lazy-evaluation": "warn", | ||
| "@logtape/no-unawaited-log": "error", | ||
| "@logtape/require-meta-sink": "warn", | ||
| "eslint/no-useless-return": "error" | ||
| }, | ||
| "ignorePatterns": [ | ||
| "**/pnpm-lock.yaml", | ||
| "pnpm-workspace.yaml", | ||
| ".agents/skills/**", | ||
| ".claude/skills/**", | ||
| ".claude-plugin/**", | ||
| ".github/**", | ||
| "claude-plugin/**", | ||
| "docs/**", | ||
| "**/*.md", | ||
| "**/*.html", | ||
| "**/*.svg", | ||
| "**/*.astro", | ||
| "**/*.svelte", | ||
| "**/*.vue", | ||
| "**/*.css", | ||
| "examples/cloudflare-workers/worker-configuration.d.ts", | ||
| "packages/cli/src/init/templates/**", | ||
| "packages/init/src/templates/**", | ||
| "packages/cfworkers/test/**", | ||
| "packages/fedify/src/cfworkers/dist/**", | ||
| "packages/fedify/src/cfworkers/fixtures/**", | ||
| "packages/fedify/src/cfworkers/imports.ts", | ||
| "packages/fedify/src/cfworkers/server.ts", | ||
| "packages/fedify/src/cfworkers/runner.ts", | ||
| "packages/fedify/src/cfworkers/selftest.ts", | ||
| "packages/fedify/src/cfworkers/server.js", | ||
| "packages/fedify/src/cfworkers/server.js.map", | ||
| "packages/sqlite/src/sqlite.bun.ts", | ||
| "examples/fresh/_fresh/**", | ||
| "examples/astro/.astro/**", | ||
| "**/dist/**", | ||
| "**/dist-tests/**", | ||
| "**/node_modules/**", | ||
| "**/npm/**", | ||
| "**/apidoc/**", | ||
| "**/*.test-report.xml", | ||
| "tools/oxlint/anti-slop/**" | ||
| ] | ||
| } | ||
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 |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| "settings": { | ||
| "deno": { | ||
| "enable": true, | ||
| "lint": false, | ||
| "unstable": true | ||
| } | ||
| } | ||
|
|
||
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.