Draft
Conversation
|
89728c1 to
669704a
Compare
dab7a78 to
708c1a2
Compare
JSON doesn't support comments; also this is a config file, not source code
First of 3 spread sites — inlining so we can remove the JS variable
Second of 3 spread sites
Third and final spread site. The .filter() removed the monaco-editor entry (it's replaced with a different message for this package).
All RESTRICTED_IMPORTS usages are now inlined, so we can drop the
variable. Also remove module.exports = { ... }; wrapper — the file
is now a plain object literal (still JS syntax, not yet valid JSON).
JSON doesn't support comments. Removed section headers, TODO notes, inline explanations, and commented-out rules.
JSON requires double-quoted keys. Used sd to add quotes to all bare JS identifiers used as object keys.
JSON requires double quotes. Fixed the apostrophe in "can't" that got caught in the replacement.
JSON doesn't allow trailing commas. The file is now valid JSON.
eslint-only option; oxlint always behaves as if root is true
eslint-only option; oxlint reports unused disable directives by default
eslint-only concept; oxlint uses plugins array instead, which enables recommended rules for each plugin automatically
eslint-only; oxlint uses its own parser and doesn't need ecmaVersion
oxlint uses a flat plugins list to enable rule sets. This replaces the eslint extends mechanism. Includes typescript, react, import, unicorn, promise, jest, and vitest.
oxlint env is a top-level config option, not per-override
oxlint globals is a top-level config option
oxlint settings (like react version detection) is a top-level option
The first override matched all code files (**.{js,jsx,ts,tsx,mts,cts})
so it was effectively global. Rules now live at the top level where
oxlint expects them. The override's plugins list is removed (handled
by the top-level plugins array added earlier).
oxlint uses "readonly"/"writable" strings instead of eslint's false/true booleans for global variable declarations
oxlint uses the shorter "typescript/" prefix for TypeScript rules
oxlint uses "import/" for import-related rules (eslint used the import-x fork plugin)
The earlier structural moves left inconsistent indentation in the overrides section. Re-formatted via json.dump for consistency.
These are all no-ops in oxlint — rules default to off unless enabled by a plugin. Includes eslint core rules, @Shopify, react/prop-types, typescript/no-require-imports, import/no-named-as-default-member, and a few unicorn rules that were explicitly disabled.
708c1a2 to
78c1008
Compare
partial replacement — only covers redundant return, not break/continue
no-catch-shadow, no-mixed-requires, no-new-object, no-octal-escape, no-restricted-properties, no-restricted-syntax, no-return-await, one-var, prefer-arrow-callback, quotes, spaced-comment, logical-assignment-operators — will recover some via eslint-js jsPlugin later
react/no-did-update-set-state, react/no-unused-state, react/prefer-stateless-function
…ot supported by oxlint also removes overrides that existed solely to configure these rules
unicorn/consistent-destructuring, unicorn/no-array-push-push, unicorn/prefer-export-from, unicorn/prefer-switch
oxlint doesn't support allow-null; smart is the closest equivalent (allows == for null checks plus a few other safe comparisons)
oxlint can't auto-detect the React version from package.json
extends (cypress, jest), parserOptions (typescript), parser + processor (mdx) — these are eslint concepts with no oxlint equivalent
oxlint doesn't support excludedFiles in overrides. Replaced with explicit files lists that cover the same packages (minus the excluded ones). Dropped the mdx excludedFiles since oxlint doesn't process mdx anyway.
not in oxlint's native react plugin — will recover via jsPlugins later
these rules are enabled by default when their plugin is loaded in oxlint but weren't in the eslint config, so disable to avoid new warnings
moved from .oxlintrc.json ignorePatterns since oxlint uses --ignore-path instead
removes 15 eslint-related packages, adds oxlint + oxlint-tsgolint. updates eslint -> oxlint in all script references.
.eslintrc.js -> .oxlintrc.json in ignorePaths, add oxlint/oxlintrc to dictionary
eslint-js bridges core eslint rules, react-hooks-js bridges react-compiler
prefer-arrow-callback, object-shorthand, one-var, operator-assignment, logical-assignment-operators, no-octal-escape, no-return-await, spaced-comment, quotes
refs and set-state-in-effect disabled (stricter than old rule, pre-existing violations). native duplicates (rules-of-hooks, exhaustive-deps) disabled since they're already covered by oxlint's built-in react-hooks plugin.
342e613 to
33aacd7
Compare
- fix react-hooks-js rule names: react-hooks v6 uses flat names (refs, set-state-in-effect, purity, etc.), not nested react-compiler/ prefix - set sonarjs replacement rules (no-void, no-useless-assignment, no-useless-return) to off — they catch real violations the sonarjs rules didn't, needs separate cleanup PR - add "run" to jest/expect-expect assertFunctionNames
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.