@acamarata/eslint-config
v0.1.0
Published
Shared ESLint flat configs for acamarata packages. TypeScript-aware, Prettier-compatible, with base, browser, node, and React variants.
Maintainers
Readme
@acamarata/eslint-config
Shared ESLint flat configs for acamarata packages. Four named exports covering common project shapes: base, TypeScript, React, and Node.js.
All configs use ESLint's flat config format (eslint.config.js). ESLint 8's legacy .eslintrc format is not supported.
Install
pnpm add -D @acamarata/eslint-config eslint eslint-config-prettierFor TypeScript projects, also install the parser and plugin:
pnpm add -D @typescript-eslint/eslint-plugin @typescript-eslint/parserFor React projects, add the React plugins as well:
pnpm add -D eslint-plugin-react eslint-plugin-react-hooksPeer dependencies
| Peer | Required for | Version |
|------|-------------|---------|
| eslint | all configs | >=9.0.0 |
| eslint-config-prettier | all configs | >=9.0.0 |
| @typescript-eslint/eslint-plugin | typescript config | >=8.0.0 |
| @typescript-eslint/parser | typescript config | >=8.0.0 |
| eslint-plugin-react | react config | >=7.0.0 (optional) |
| eslint-plugin-react-hooks | react config | >=5.0.0 (optional) |
Usage
Base (JS only)
// eslint.config.js
import { base } from '@acamarata/eslint-config';
export default [...base];TypeScript
// eslint.config.js
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import { typescript } from '@acamarata/eslint-config';
export default [
{
plugins: { '@typescript-eslint': tsPlugin },
languageOptions: { parser: tsParser },
},
...typescript,
];React
// eslint.config.js
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import { react } from '@acamarata/eslint-config';
export default [
{
plugins: {
'@typescript-eslint': tsPlugin,
react: reactPlugin,
'react-hooks': reactHooksPlugin,
},
languageOptions: { parser: tsParser },
},
...react,
];Node.js
// eslint.config.js
import { node } from '@acamarata/eslint-config';
export default [...node];Exported configs
| Export | Extends | Key rules |
|--------|---------|-----------|
| base | none | prefer-const, no-var, eqeqeq, no-unused-vars, no-console warn |
| typescript | base | @typescript-eslint/no-explicit-any error, explicit-module-boundary-types, prefer-optional-chain |
| react | typescript | react-hooks/exhaustive-deps error, react-hooks/rules-of-hooks error, jsx-key error |
| node | base | no-console off (server/CLI code may log), no-process-exit error |
TypeScript strict mode
The typescript config sets @typescript-eslint/no-explicit-any: 'error'. Every any cast in your codebase needs an inline comment explaining why it is necessary. This is intentional: it keeps the type surface honest.
Compatibility
- Node.js 20, 22, 24
- ESLint 9 flat config only
- TypeScript 5.x
Related packages
- @acamarata/tsconfig - shared TypeScript configs
- @acamarata/prettier-config - shared Prettier config
License
MIT. See LICENSE.
