oxlint.json in Preact source code.
I found a file named oxlint.json in Preact source code. I wanted to learn more about this. In this article, you will learn what this file is about.
Oxlint is a linter
oxc-project is an organization that provides a collection of JavaScript tools written in Rust. Oxlint is a linter.
The below information is picked from oxc docs.
Oxlint is designed to catch erroneous or useless code without requiring any configurations by default.
Note:
At the current stage, oxlint is not intended to fully replace ESLint; it serves as an enhancement when ESLint’s slowness becomes a bottleneck in your workflow.
We recommend running oxlint before ESLint in your lint-staged or CI setup for a quicker feedback loop, considering it only takes a few seconds to run on large codebases.
Features
-
50–100 times faster than ESLint, and scales with the number of CPU cores (benchmark).
-
Over 480 rules with a growing list from
eslint
,typescript
,eslint-plugin-react
,eslint-plugin-jest
,eslint-plugin-unicorn
,eslint-plugin-jsx-a11y
and many more. -
Supports
-
Partial ESLint v8 Configuration in
json
format
Read more about Oxlint.
Oxlint script in package.json
In the Preact’s package.json, you will find the below script at line 144.
"oxlint": "oxlint -c oxlint.json src test/browser test/node test/shared debug compat hooks test-utils",
About me:
Hey, my name is Ramu Narasinga. I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.
I am open to work on interesting projects. Send me an email at ramu.narasinga@gmail.com
My Github — https://github.com/ramu-narasinga
My website — https://ramunarasinga.com
My Youtube channel — https://www.youtube.com/@thinkthroo
Learning platform — https://thinkthroo.com
Codebase Architecture — https://app.thinkthroo.com/architecture
Best practices — https://app.thinkthroo.com/best-practices
Production-grade projects — https://app.thinkthroo.com/production-grade-projects