Consistent code quality across six apps and multiple shared packages is enforced by two complementary tools: ESLint for static analysis and Prettier for deterministic formatting. Both are orchestrated through Turborepo so that only affected workspaces are rechecked when code changes, and all rules are sourced from shared configs inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Codefied-CodePix/KaroCar-platform/llms.txt
Use this file to discover all available pages before exploring further.
packages/eslint-config so every app inherits the same baseline.
ESLint
Running the Linter
Lint all workspaces from the repository root:turbo run lint, which executes the lint script defined in each workspace’s package.json in parallel. To lint only one app:
Shared ESLint Configs
All ESLint configuration lives inpackages/eslint-config and is published internally as @repo/eslint-config. There are three named exports, each targeting a different context:
| Export | Used by | What it adds |
|---|---|---|
@repo/eslint-config/base | All workspaces | JS, TypeScript, Turbo plugin, Prettier compat |
@repo/eslint-config/next | Next.js apps | Extends base + Next.js & Core Web Vitals rules |
@repo/eslint-config/react-internal | Internal React packages | Extends base + React hooks rules |
@repo/eslint-config/base
The foundation for every workspace. It composes several upstream configs and adds two important plugins:
@repo/eslint-config/next
Extends base and layers in the official Next.js ESLint plugin with both its recommended and core-web-vitals rule sets, plus React Hooks rules. Used by all apps in apps/:
@repo/eslint-config/react-internal
Extends base with React and React Hooks rules, targeting shared component packages (like @karo-car/ui) that ship React components but are not Next.js apps.
Turbo Environment Variable Rule
Theturbo/no-undeclared-env-vars rule (from eslint-plugin-turbo) warns whenever your code reads a process.env variable that hasn’t been declared in that workspace’s Turborepo task configuration. This prevents silent failures where a missing env var causes a build to succeed locally but fail in CI.
All ESLint rules in KaroCar Platform emit warnings, not errors, thanks to
eslint-plugin-only-warn. This keeps your editor experience smooth during
active development while still surfacing issues — and CI can be configured to
treat warnings as errors with the --max-warnings 0 flag if desired.Prettier
Running the Formatter
Prettier is configured to format TypeScript, TSX, and Markdown files. Run it from the repository root:Prettier + ESLint Integration
eslint-config-prettier is included in @repo/eslint-config/base. It disables any ESLint rules that would conflict with Prettier’s formatting decisions, so the two tools never disagree about whitespace, semicolons, or quote style.
Type Checking
Type checking is a separate step from linting and runs via the rootcheck-types script:
turbo run check-types across all workspaces, executing tsc --noEmit in each workspace that defines that script. Note that check-types is not declared in turbo.json’s tasks section — it is driven by the root-level script. Turborepo still caches its results independently — a workspace whose source files haven’t changed won’t re-run tsc.
