@haykal/eslint-config
v1.0.0
Published
Centralized ESLint configurations for the Haykal monorepo.
Readme
@haykal/eslint-config
Centralized ESLint configurations for the Haykal monorepo.
Available Configurations
| Config | Import Path | Description |
| ------------ | -------------------------------- | -------------------------------- |
| base | @haykal/eslint-config/base | Shared TypeScript/Prettier rules |
| backend | @haykal/eslint-config/backend | NestJS-specific rules |
| frontend | @haykal/eslint-config/frontend | React/Next.js rules |
| mobile | @haykal/eslint-config/mobile | React Native/Expo rules |
Usage
In your project's eslint.config.mjs:
const backendConfig = require('@haykal/eslint-config/backend');
module.exports = [
...backendConfig,
// project-specific overrides
];Key Rules
- No
any-@typescript-eslint/no-explicit-any: error - Naming conventions - PascalCase for classes, camelCase for functions, UPPER_CASE for constants
- Consistent type imports - Enforces
import { type Foo }syntax - No console.log - Use logger service in backend/frontend/mobile (warn level)
- Explicit return types - Required in backend, optional in frontend/mobile
Test Files
Test files (*.spec.ts, *.test.ts, *.e2e-spec.ts) have relaxed rules:
anyis allowed- Explicit return types not required
- Console logging allowed
