No description
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| node_modules/.bin | ||
| index.js | ||
| package.json | ||
| README.md | ||
@lilith/eslint-config-react-app
ESLint configuration for React applications.
When to Use
Use this config for standalone React applications that are NOT consumed as dependencies by other packages:
- Landing pages (
features/landing/frontend-public) - Admin dashboards (
features/platform-admin/frontend) - User portals (
features/portal/frontend)
When NOT to Use
Do NOT use for React code that is consumed as a workspace dependency:
- Payment UI components (
features/payments/frontend-checkout) - Shared UI libraries
For libraries, use @lilith/eslint-config-react-lib instead.
What It Adds
Extends @lilith/eslint-config-react with:
| Rule | Effect |
|---|---|
@lilith/import-alias/prefer-alias |
Enforces @/* aliases (../hooks/foo → @/hooks/foo) |
@lilith/import-alias/use-platform-namespace |
Enforces @platform/* for cross-feature imports |
Installation
pnpm add -D @lilith/eslint-config-react-app @lilith/eslint-plugin-import-alias
Usage
// .eslintrc.js
module.exports = {
extends: ['@lilith/eslint-config-react-app'],
};
Why Separate Configs?
Applications can use @/ aliases because they're the final consumer - aliases resolve at build time.
Libraries cannot use @/ aliases because when symlinked into a consumer, @/ resolves against the consumer's tsconfig, not the library's. This causes build failures.