Use this file to discover all available pages before exploring further.
@repo/eslint-config provides a set of shared ESLint configuration presets for all KaroCar Platform workspaces. Three configs cover different environments: base (all TypeScript projects), next (Next.js applications), and react-internal (React library packages). By centralising lint rules in one place, every app and package in the monorepo stays consistently formatted and linted without duplicating configuration.
@repo/eslint-config is marked "private": true in its package.json and is not published to npm. It is consumed exclusively as an internal workspace dependency.
The foundation shared by every other preset. Use this for any TypeScript package that doesn’t target Next.js or React specifically.Extends / integrates:
Layer
Purpose
@eslint/js recommended
Core JavaScript best-practice rules
typescript-eslint recommended
TypeScript-aware lint rules
eslint-config-prettier
Disables formatting rules that conflict with Prettier
eslint-plugin-turbo
Turbo-aware rules (env-var declarations)
eslint-plugin-only-warn
Downgrades all rule violations to warnings
Source — base.js:
import js from "@eslint/js";import eslintConfigPrettier from "eslint-config-prettier";import turboPlugin from "eslint-plugin-turbo";import tseslint from "typescript-eslint";import onlyWarn from "eslint-plugin-only-warn";export const config = [ js.configs.recommended, eslintConfigPrettier, ...tseslint.configs.recommended, { plugins: { turbo: turboPlugin }, rules: { "turbo/no-undeclared-env-vars": "warn" }, }, { plugins: { onlyWarn }, }, { ignores: ["dist/**"] },];
Usage:
eslint.config.mjs
import { config } from "@repo/eslint-config/base";export default config;
Extends base and layers in React, React Hooks, and Next.js-specific rules. Used by all apps in the apps/ directory that are built with Next.js (e.g., apps/web, apps/admin).Extends / integrates (on top of base):
Extends base and adds React and React Hooks rules tailored for component library packages (e.g., @karo-car/ui). Unlike the next preset, this config does not include any Next.js-specific rules and is intended for packages that are framework-agnostic React libraries.Extends / integrates (on top of base):
Layer
Purpose
eslint-plugin-react flat recommended
React JSX and component rules
eslint-plugin-react-hooks recommended
Hooks exhaustive-deps and rules-of-hooks
Notable overrides:
react/react-in-jsx-scope is turned off.
Both globals.serviceworker and globals.browser are included in the language options.
Usage:
eslint.config.mjs
import { config } from "@repo/eslint-config/react-internal";export default config;
Warns whenever a Turbo pipeline task reads an environment variable that has not been declared in turbo.json. This prevents silent failures in CI where a variable is available locally but missing in the pipeline cache key.
eslint-plugin-only-warn
Converts every lint rule violation — across all extended configs — from an error to a warning. This keeps the developer experience non-blocking while still surfacing issues in the editor and in CI output.