@univ-lehavre/atlas-eslint-config
v0.1.0
Published
Shared ESLint configuration for Atlas projects
Readme
@univ-lehavre/atlas-eslint-config
Shared ESLint configuration for Atlas projects, optimized for TypeScript and functional programming with Effect.
Installation
pnpm add -D @univ-lehavre/atlas-eslint-configUsage
// eslint.config.js
import base from '@univ-lehavre/atlas-eslint-config/base';
export default [...base];Features
TypeScript Strict Mode
Based on tseslint.configs.strictTypeChecked:
strict-boolean-expressions- No implicit boolean coercionno-floating-promises- All promises must be handledno-explicit-any- Forbidsanytypeconsistent-type-imports- Forcesimport typesyntaxswitch-exhaustiveness-check- All cases must be covered
Functional Programming
Based on eslint-plugin-functional:
no-expression-statements- No side effects without returnno-conditional-statements- Forces ternaries/pattern matchingno-throw-statements- Use Effect instead of throwno-try-statements- Use Effect instead of try/catchimmutable-data- No object/array mutation
Security
Based on eslint-plugin-security:
detect-unsafe-regex- Detects ReDoS-vulnerable regexdetect-eval-with-expression- Forbids eval with expressionsdetect-object-injection- Warns on dynamic property access
Code Quality
| Rule | Value | Description |
| ------------------------ | ----- | ---------------------------------------- |
| max-depth | 4 | Maximum nesting depth |
| max-lines-per-function | 60 | Maximum lines per function |
| complexity | 15 | Maximum cyclomatic complexity |
| no-console | error | Forbids console.log (allows warn, error) |
Effect.js Patterns
The following patterns are automatically allowed:
Effect.runPromise(...)
pipe(value, Effect.map(...))
Layer.succeed(...)
app.get('/path', handler)Test Files
Strict rules are disabled for *.test.ts and *.spec.ts files.
License
MIT
