-
Couldn't load subscription status.
- Fork 390
[feat] Add oxlint before eslint for 62x faster linting #6069
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "rules": { | ||
| "typescript/no-explicit-any": "off", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [quality] medium Priority Issue: oxlint disables critical TypeScript rules that help maintain code quality There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These rules (no-explicit-any, no-unused-vars) are intentionally disabled in both oxlint and ESLint (see eslint.config.ts:113-114). This maintains consistency between the two linters and follows the existing project policy. The code quality is maintained by other TypeScript checks. |
||
| "typescript/no-unused-vars": "off", | ||
| "unicorn/prefer-at": "warn", | ||
| "unicorn/prefer-string-slice": "warn", | ||
| "unicorn/prefer-code-point": "warn", | ||
| "unicorn/prefer-date-now": "warn", | ||
| "unicorn/prefer-dom-node-text-content": "warn", | ||
| "unicorn/prefer-includes": "warn", | ||
| "unicorn/prefer-modern-dom-apis": "warn", | ||
| "unicorn/prefer-node-protocol": "warn", | ||
| "unicorn/prefer-number-properties": "warn", | ||
| "unicorn/prefer-optional-catch-binding": "warn", | ||
| "unicorn/prefer-string-starts-ends-with": "warn", | ||
| "unicorn/throw-new-error": "warn" | ||
| }, | ||
| "ignore": [ | ||
| "node_modules", | ||
| "dist", | ||
| "build", | ||
| ".storybook", | ||
| "storybook-static", | ||
| ".i18nrc.cjs", | ||
| "components.d.ts", | ||
| "lint-staged.config.js", | ||
| "vitest.setup.ts", | ||
| "**/vite.config.*.timestamp*", | ||
| "**/vitest.config.*.timestamp*", | ||
| "packages/registry-types/src/comfyRegistryTypes.ts", | ||
| "src/extensions/core/*", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [security] low Priority Issue: Very broad ignore patterns may exclude files that should be linted There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These ignore patterns match the existing ESLint configuration (see eslint.config.ts:48-60) to ensure consistent behavior between both linters. The ignored paths contain auto-generated code, third-party extensions, and build artifacts that don't require linting. This is intentional and follows the project's existing conventions. |
||
| "src/scripts/*", | ||
| "src/types/generatedManagerTypes.ts", | ||
| "src/types/vue-shim.d.ts" | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ import pluginJs from '@eslint/js' | |
| import pluginI18n from '@intlify/eslint-plugin-vue-i18n' | ||
| import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript' | ||
| import { importX } from 'eslint-plugin-import-x' | ||
| import oxlint from 'eslint-plugin-oxlint' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [architecture] critical Priority Issue: PR includes merged changes from main branch, making review extremely difficult There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR branch contains only the oxlint implementation changes. The apparent merge of main branch changes is due to keeping the branch up-to-date with the latest main branch. The core oxlint changes are in: oxlintrc.json (new file), package.json (lint scripts), eslint.config.ts (oxlint plugin), and catalog dependencies. All other files are from staying current with main. |
||
| import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' | ||
| import storybook from 'eslint-plugin-storybook' | ||
| import tailwind from 'eslint-plugin-tailwindcss' | ||
|
|
@@ -105,6 +106,7 @@ export default defineConfig([ | |
| importX.flatConfigs.recommended, | ||
| // @ts-expect-error Bad types in the plugin | ||
| importX.flatConfigs.typescript, | ||
| oxlint.configs['flat/recommended'], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [architecture] medium Priority Issue: No validation that oxlint and ESLint configurations are properly synchronized There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a valid suggestion for future improvement. The oxlint plugin (eslint-plugin-oxlint) is already configured at line 104 to disable conflicting rules. Adding automated validation would be helpful but is beyond the scope of this initial integration. I'll create a follow-up issue to track this enhancement. |
||
| { | ||
| plugins: { | ||
| 'unused-imports': unusedImports, | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.