V2 – chore(eslint): migrate to oxlint, oxfmt#8282
V2 – chore(eslint): migrate to oxlint, oxfmt#8282Kenzo-Wada wants to merge 6 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
package.json
Outdated
| }, | ||
| "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
|
@Kenzo-Wada ping, your awesome PR still needs some love 🙏 |
e64fb9b to
6a228ce
Compare
6a228ce to
af8e04d
Compare
|
Sorry about the delay. Work has been crazy lately. |
| "lint-staged": { | ||
| "*.{js,jsx,ts,tsx,mjs,cjs}": [ | ||
| "oxfmt --write", | ||
| "oxlint --quiet --deny-warnings" |
There was a problem hiding this comment.
actually I think it's fine to ignore warnings here
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