V2 – chore(eslint): migrate to oxlint, oxfmt#8282
V2 – chore(eslint): migrate to oxlint, oxfmt#8282Kenzo-Wada wants to merge 2 commits intoQwikDev:build/v2from
Conversation
|
gioboa
left a comment
There was a problem hiding this comment.
Thanks for your help @Kenzo-Wada
Can I ask you to resolve the conflicts please?
|
@Kenzo-Wada ideally you add a commit with just the configuration, then a commit with the result of running lint, and commits before/after with manual fixes if any are needed. That way conflicts are easy to handle |
7092c93 to
0ffee29
Compare
gioboa
left a comment
There was a problem hiding this comment.
I did some research with AI and there is a way to preserve all the files with the same formatting. You can achieve it with the right configuration. This means: new faster tool and same formatting, it will be amazing
|
Ill get into it. Thankyou for the research! |
|
I tried adjusting the oxfmt configuration, but couldn't find options to control import/function parameter line wrapping behavior. Also, I noticed the existing codebase has inconsistent formatting (mixed single/double quotes in some files), which may complicate the migration. |
|
@Kenzo-Wada about the inconsistencies: the starters subdirectory isn't configured quite correctly. It would be great if it is consistent with the rest. |
gioboa
left a comment
There was a problem hiding this comment.
@Kenzo-Wada you are right the style inside the different folders looks inconsistent.
we can try to do our best with the configuration. here is an example.
|
Thanks @Kenzo-Wada for the initiative! Greatly appreciated ⚡️ |
wmertens
left a comment
There was a problem hiding this comment.
some important things + the tests are failing because of missing prettier
| @@ -0,0 +1,10 @@ | |||
| { | |||
| "$schema": "https://oxc.rs/schemas/oxfmt.json", | |||
| "experimentalPrettierFallback": true, | |||
There was a problem hiding this comment.
does this mean that prettier still needs to be present, and its ignore file as well?
| "vitest/no-disabled-tests": "off", | ||
| "vitest/valid-title": "off", | ||
| "vitest/warn-todo": "off", | ||
| "jest/expect-expect": "off", |
| "jsdoc/require-property": "off", | ||
| "jsdoc/require-yields": "off", | ||
| "vitest/expect-expect": "off", | ||
| "vitest/no-disabled-tests": "off", |
There was a problem hiding this comment.
we had the "no-only-test" eslint rule, so I think this should be on instead
There was a problem hiding this comment.
this is missing the very important @typescript-eslint/no-restricted-imports and its configuration
| packages/qwik-labs/lib-types | ||
| packages/qwik-labs/vite |
| }, | ||
| "simple-git-hooks": { | ||
| "pre-commit": "pnpm pretty-quick --staged" | ||
| "pre-commit": "pnpm fmt.staged" |
There was a problem hiding this comment.
now that oxlint is so fast, maybe you can add lint-staged to the mix, and do both formatting and lint checking (no fix) to precommit
What is it?
Description
Migrate from ESLint + Prettier to OxLint + OxFmt for faster linting and formatting.
Changes
experimentalPrettierFallbackfor md/json/yaml)eslint,prettier,prettier-plugin-jsdoc,prettier-plugin-tailwindcss,pretty-quickoxlint,oxfmtBenchmark (no cache)
pnpm lintpnpm fmtChecklist
pnpm change