@reasonabletech/eslint-config
v0.2.1
Published
Shared ESLint configuration
Maintainers
Readme
@reasonabletech/eslint-config
@reasonabletech/eslint-config provides opinionated, type-aware ESLint flat configs for TypeScript, React, and Next.js projects. Type-aware linting runs ESLint rules that require a TypeScript project reference — these rules catch issues like unsafe any assignments and incorrect promise handling that non-type-aware rules miss.
Installation
pnpm add -D @reasonabletech/eslint-config eslint typescriptPeer Dependencies
| Dependency | Version | Required | | ---------- | --------- | -------- | | eslint | >= 9.0 | Yes | | typescript | >= 5.0 | Yes |
This package uses ESLint flat config format (introduced in ESLint 9.0) and requires TypeScript 5.0+ for type-aware linting. Legacy .eslintrc configuration is not supported.
Exported Entry Points
| Import Path | Purpose | Main Exports |
| ------------------------------------- | -------------------------- | ---------------------------------------------------- |
| @reasonabletech/eslint-config | TypeScript baseline config | createTypeAwareConfig, sharedReactComponentRules |
| @reasonabletech/eslint-config/react | React project config | createTypeAwareReactConfig |
| @reasonabletech/eslint-config/next | Next.js project config | createTypeAwareNextConfig |
Usage
TypeScript Project
// eslint.config.mjs
import { createTypeAwareConfig } from "@reasonabletech/eslint-config";
export default createTypeAwareConfig(import.meta.dirname);React Project
// eslint.config.mjs
import { createTypeAwareReactConfig } from "@reasonabletech/eslint-config/react";
export default createTypeAwareReactConfig(import.meta.dirname);Next.js Project
// eslint.config.mjs
import { createTypeAwareNextConfig } from "@reasonabletech/eslint-config/next";
export default createTypeAwareNextConfig(import.meta.dirname);Customize Rules for Your Project
// eslint.config.mjs
import { createTypeAwareConfig } from "@reasonabletech/eslint-config";
export default [
...createTypeAwareConfig(import.meta.dirname),
{
rules: {
"@typescript-eslint/no-unused-vars": "warn",
},
},
];Changelog
See CHANGELOG.md for release history.
This package follows Semantic Versioning. Breaking changes are documented with migration guides when applicable.
