I have a turbo monorepo and in the root package.json I have
"scripts": {
...
"lint": "turbo run lint",
...
},
"devDependencies": {
...
},
"nano-staged": {
"*.{js,jsx,ts,tsx,mjs,cjs}": [
"oxlint",
"oxfmt"
]
},
and a root oxlint.config.ts:
import { defineConfig } from "oxlint";
export default defineConfig({
categories: {
correctness: "error",
nursery: "error",
pedantic: "off",
perf: "error",
restriction: "off",
style: "off",
suspicious: "off",
},
options: {
typeAware: true,
typeCheck: true,
},
env: {
browser: true,
es2025: true,
node: true,
},
globals: {
document: "writable",
window: "writable",
sessionStorage: "writable",
},
ignorePatterns: [
".agents/",
".cache/",
".config/",
".opencode/",
"apps/api/",
"apps/web/src/api/generated/",
"apps/web/src/paraglide/",
"apps/web/src/routeTree.gen.ts",
"coverage/",
"docs/",
"renovate.json5",
"pnpm-lock.yaml",
"pnpm-workspace.yaml",
],
overrides: [
{
files: ["apps/web/src/**/*.{ts,tsx}"],
jsPlugins: [
{
name: "@tanstack/router",
specifier: "@tanstack/eslint-plugin-router",
},
],
rules: {
"@tanstack/router/create-route-property-order": "warn",
"@tanstack/router/route-param-names": "error",
},
},
{
files: ["apps/web/src/**/*.{ts,tsx}"],
jsPlugins: [
{
name: "@tanstack/query",
specifier: "@tanstack/eslint-plugin-query",
},
],
rules: {
"@tanstack/query/exhaustive-deps": "error",
"@tanstack/query/infinite-query-property-order": "error",
"@tanstack/query/mutation-property-order": "error",
"@tanstack/query/no-rest-destructuring": "warn",
"@tanstack/query/no-unstable-deps": "error",
"@tanstack/query/no-void-query-fn": "error",
"@tanstack/query/stable-query-client": "error",
},
},
],
plugins: ["eslint", "typescript", "react", "oxc", "import", "vitest"],
rules: {
"eslint/no-unused-vars": "error",
"import/no-default-export": "off",
},
});
and packages/app with a simple lint task: "lint": "oxlint"
Now when I run turbo lint which will execture the lint task in all sub-packages, it will not accept this config and throw an error about the typeAware flag:
> @tds/ui@0.0.0 lint /Users/user/projects/work/tds/packages/ui
> oxlint --max-warnings 0
Failed to parse oxlint configuration file.
× The `options.typeAware` option is only supported in the root config, but it was found in /Users/user/projects/work/tds/oxlint.config.t
s.
help: Move `options.typeAware` to the root configuration file.
SO I tried another way by making a shared oxlint-config package that the other packages/apps import and extend from, sadly no luck there either. It always refuses to use typeAware.
Any ideas? Do I need to do something like "lint": "oxlint --config=../../oxlint.config.ts" in every package?
I have a turbo monorepo and in the root
package.jsonI haveand a root oxlint.config.ts:
and packages/app with a simple lint task:
"lint": "oxlint"Now when I run
turbo lintwhich will execture the lint task in all sub-packages, it will not accept this config and throw an error about thetypeAwareflag:SO I tried another way by making a shared
oxlint-configpackage that the other packages/apps import and extend from, sadly no luck there either. It always refuses to usetypeAware.Any ideas? Do I need to do something like
"lint": "oxlint --config=../../oxlint.config.ts"in every package?