Skip to content

chore: move linting and formatting to oxlint and oxfmt#1984

Open
janburzinski wants to merge 3 commits into
generalaction:mainfrom
janburzinski:emdash/move-to-oxlint-oxfmt-ta4ed
Open

chore: move linting and formatting to oxlint and oxfmt#1984
janburzinski wants to merge 3 commits into
generalaction:mainfrom
janburzinski:emdash/move-to-oxlint-oxfmt-ta4ed

Conversation

@janburzinski
Copy link
Copy Markdown
Collaborator

summary

  • move from eslint and prettier to oxlint and oxfmt

benchmarks on this repo:
Screenshot 2026-05-12 at 11 21 27

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR replaces ESLint + Prettier with oxlint + oxfmt for faster linting and formatting, removes the old config files, and applies the reformatted output across a handful of source files. The benchmark screenshot in the description shows a significant speed improvement on this repo.

  • Config files (.eslintrc.json, .prettierrc, .prettierignore, eslint.config.ts) are deleted and replaced with .oxlintrc.json and .oxfmtrc.json; package.json scripts and lint-staged are updated accordingly, and all ESLint/Prettier devDependencies are removed.
  • Source-file changes are purely mechanical: method-chain reflowing in schema.ts, template-literal line breaks in several TSX files, and ...(x ?? {})...x simplifications across stores and service files (all semantically safe in ES2018+).
  • Two capabilities from the old setup are not carried over: Tailwind CSS class ordering (prettier-plugin-tailwindcss) and import order sorting (@ianvs/prettier-plugin-sort-imports); three type-aware async rules (no-floating-promises, no-misused-promises, await-thenable) are also absent from the new oxlint config.

Confidence Score: 4/5

Safe to merge — all source changes are formatting-only and the tool swap is straightforward. The main gap is that three async safety rules from the old ESLint config are not replicated in oxlint.

All code-level changes are mechanical reformatting with no logic impact. The new oxlint config is otherwise equivalent to the old one, but the async-safety rules (no-floating-promises, no-misused-promises, await-thenable) that were explicitly wired up in the old eslint.config.ts are absent, which means async-misuse patterns will no longer be flagged at lint time.

.oxlintrc.json — verify whether the missing async safety rules need to be added explicitly

Important Files Changed

Filename Overview
.oxlintrc.json New oxlint config replacing eslint.config.ts; drops three type-aware async safety rules (no-floating-promises, no-misused-promises, await-thenable) that were explicitly configured before
.oxfmtrc.json New oxfmt formatter config matching old prettier settings; loses Tailwind class sorting and import order enforcement
package.json lint/format/format:check scripts updated to use oxlint/oxfmt; lint-staged extended to cover JSON/CSS files; ESLint, Prettier and related dependencies removed
src/main/core/jira/jira-connection-service.ts ...(extraHeaders
src/main/core/mcp/utils/adapters.ts Same ?? {} → direct-spread simplification; semantically equivalent in modern JS
src/renderer/lib/pty/pty.ts Added oxlint-disable-next-line for unicorn/no-useless-spread with explanation; snapshot spread is intentional to avoid mutation during iteration
src/main/db/schema.ts Drizzle method chains collapsed to single lines by oxfmt; no logic changes

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before["Before - Removed"]
        A["eslint.config.ts"] --> B["ESLint + typescript-eslint"]
        C[".prettierrc"] --> D["Prettier"]
        D --> E["prettier-plugin-tailwindcss\nClass ordering"]
        D --> F["prettier-plugin-sort-imports\nImport ordering"]
        B --> G["no-floating-promises\nno-misused-promises\nawait-thenable"]
    end

    subgraph After["After - Added"]
        H[".oxlintrc.json"] --> I["oxlint"]
        J[".oxfmtrc.json"] --> K["oxfmt"]
        I --> L["correctness: error\nreact-hooks rules\ntypescript rules"]
    end

    subgraph LS["lint-staged"]
        M["ts, tsx, js, json, css"] --> K
        N["ts, tsx, js, jsx"] --> I
    end

    style G fill:#f99,stroke:#c00
    style E fill:#f99,stroke:#c00
    style F fill:#f99,stroke:#c00
Loading
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
.oxlintrc.json:1-45
**Type-aware async safety rules dropped**

The original `eslint.config.ts` explicitly enabled three TypeScript type-aware rules scoped to `src/**`:
- `@typescript-eslint/no-floating-promises` (warn)
- `@typescript-eslint/no-misused-promises` with `{ checksVoidReturn: { attributes: false } }`
- `@typescript-eslint/await-thenable` (warn)

None of these appear in the new oxlint config, and they are not part of the `"correctness": "error"` category. oxlint supports `typescript/no-floating-promises` and `typescript/no-misused-promises` but they require explicit opt-in. Without them, unhandled promise rejections (e.g. an `async` function passed as a click handler whose rejection is never caught) will no longer be caught at lint time.

### Issue 2 of 2
.oxfmtrc.json:1-14
**Tailwind CSS class ordering no longer enforced**

The removed `.prettierrc` used `prettier-plugin-tailwindcss` (with `"tailwindStylesheet": "./src/renderer/index.css"`) to automatically sort Tailwind utility classes into the canonical order. oxfmt has no equivalent plugin, so class ordering in JSX `className` attributes will no longer be normalised on format. This mainly affects consistency across contributors.

Reviews (1): Last reviewed commit: "chore: move linting and formatting to ox..." | Re-trigger Greptile

Comment thread .oxlintrc.json
Comment on lines +1 to +45
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "react", "unicorn", "oxc", "import"],
"categories": {
"correctness": "error"
},
"env": {
"browser": true,
"node": true,
"es2024": true
},
"ignorePatterns": [
"dist/**",
"out/**",
"build/**",
"release/**",
"node_modules/**",
"drizzle/meta/**",
"**/_*/**"
],
"rules": {
"no-control-regex": "off",
"no-empty": ["warn", { "allowEmptyCatch": true }],
"prefer-const": "error",
"typescript/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
],
"typescript/no-explicit-any": "warn",
"typescript/consistent-type-imports": [
"warn",
{ "prefer": "type-imports", "fixStyle": "inline-type-imports" }
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
},
"overrides": [
{
"files": ["**/*.test.ts", "**/*.test.tsx"],
"rules": {
"typescript/no-explicit-any": "off"
}
}
]
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Type-aware async safety rules dropped

The original eslint.config.ts explicitly enabled three TypeScript type-aware rules scoped to src/**:

  • @typescript-eslint/no-floating-promises (warn)
  • @typescript-eslint/no-misused-promises with { checksVoidReturn: { attributes: false } }
  • @typescript-eslint/await-thenable (warn)

None of these appear in the new oxlint config, and they are not part of the "correctness": "error" category. oxlint supports typescript/no-floating-promises and typescript/no-misused-promises but they require explicit opt-in. Without them, unhandled promise rejections (e.g. an async function passed as a click handler whose rejection is never caught) will no longer be caught at lint time.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .oxlintrc.json
Line: 1-45

Comment:
**Type-aware async safety rules dropped**

The original `eslint.config.ts` explicitly enabled three TypeScript type-aware rules scoped to `src/**`:
- `@typescript-eslint/no-floating-promises` (warn)
- `@typescript-eslint/no-misused-promises` with `{ checksVoidReturn: { attributes: false } }`
- `@typescript-eslint/await-thenable` (warn)

None of these appear in the new oxlint config, and they are not part of the `"correctness": "error"` category. oxlint supports `typescript/no-floating-promises` and `typescript/no-misused-promises` but they require explicit opt-in. Without them, unhandled promise rejections (e.g. an `async` function passed as a click handler whose rejection is never caught) will no longer be caught at lint time.

How can I resolve this? If you propose a fix, please make it concise.

Comment thread .oxfmtrc.json
Comment on lines +1 to +14
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"lineWidth": 100,
"indentWidth": 2,
"indentStyle": "space",
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"semicolons": "always",
"trailingCommas": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParentheses": "always",
"lineEnding": "lf"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Tailwind CSS class ordering no longer enforced

The removed .prettierrc used prettier-plugin-tailwindcss (with "tailwindStylesheet": "./src/renderer/index.css") to automatically sort Tailwind utility classes into the canonical order. oxfmt has no equivalent plugin, so class ordering in JSX className attributes will no longer be normalised on format. This mainly affects consistency across contributors.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .oxfmtrc.json
Line: 1-14

Comment:
**Tailwind CSS class ordering no longer enforced**

The removed `.prettierrc` used `prettier-plugin-tailwindcss` (with `"tailwindStylesheet": "./src/renderer/index.css"`) to automatically sort Tailwind utility classes into the canonical order. oxfmt has no equivalent plugin, so class ordering in JSX `className` attributes will no longer be normalised on format. This mainly affects consistency across contributors.

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant