mirror of
https://github.com/hanzoai/turborepo.git
synced 2026-10-30 19:44:51 +00:00
Okay @anthonyshew here's the skinny: **What is this?** A linter preset that enforces consistent code style and catches common mistakes automatically. **Why are more rules turned off in the config?** Because the Ultracite preset we're extending turns on so many rules by default, it would cause issues. Think of it like this - originally you had like 5 rules enabled. Ultracite enables like 800. So we turn off a couple to make it play nice with Turborepo. **Why did it change so many files?** Because I ran the linter with the new preset. I modified Ultracite to reduce the potential changes from 19000+ to a couple of hundred. The changes are mechanical — no logic changed. **Will it reduce bugs?** Yes, in the sense it enables rules like [react/exhaustive-deps](https://oxc.rs/docs/guide/usage/linter/rules/react/exhaustive-deps) that catch runtime bugs. **Will it make the code faster?** Surprisingly, yes which I know you'll enjoy (albeit marginally). For example, I swapped your `forEach`es to `for...of` loops which are slightly faster since there's no callback overhead. **Will this have any impact on my day to day life?** You may get more recommendations from Oxlint telling you to do things a certain way, or they may just fix themselves once you hit save. If they don't, tell old mate Claude to fix. **Is there more to come?** If you want. This is a very custom version of Ultracite with many rules disabled to make it easily adoptable by Turborepo. If you want to adopt more later, it's as easy as disabling the rule overrides in `.oxlint.json` and letting Ultracite do it's work (or more likely, asking me to do it).
12 lines
234 B
JSON
12 lines
234 B
JSON
{
|
|
"extends": "@repo/typescript-config/base.json",
|
|
"compilerOptions": {
|
|
"lib": ["ES2015"],
|
|
"outDir": "./dist",
|
|
"rootDir": "./src",
|
|
"strictNullChecks": true
|
|
},
|
|
"exclude": ["node_modules"],
|
|
"include": ["src"]
|
|
}
|