ESLint plugin for Earth Kiln projects that enforces correct usage of client/server code.
npm install --save-dev @earth-kiln/eslint-plugin
# or
yarn add -D @earth-kiln/eslint-plugin
# or
bun add -D @earth-kiln/eslint-plugin
Add to your .eslintrc.js
:
module.exports = {
plugins: ['@earth-kiln'],
extends: ['plugin:@earth-kiln/recommended']
}
This rule prevents mixing client/server imports with incorrect use directives:
❌ Invalid:
"use client"
import { createServerClient } from "@/core/supabase/server"
// or
"use server"
import { createBrowserClient } from "@/core/supabase/browser"
✅ Valid:
"use client"
import { createBrowserClient } from "@/core/supabase/browser"
// or
"use server"
import { createServerClient } from "@/core/supabase/server"