@plumile/eslint-config-typescript
v0.1.87
Published
Shared ESLint flat config tuned for TypeScript-forward React projects
Downloads
471
Readme
@plumile/eslint-config-typescript
Shared ESLint flat config for TypeScript-forward React projects.
Status
Recommended for external use. This is one of the clearest standalone packages in the repository and is designed to work outside the Plumile monorepo.
Purpose
The package provides:
- a reusable flat ESLint config array
- a
createConfighelper for customtsconfiglocations - a Relay-specific preset in
relay.js
It is intended for projects that want Plumile's TypeScript, React, accessibility and code-quality defaults without copying rule definitions manually.
Installation
npm install --save-dev eslint @plumile/eslint-config-typescriptTypical peer dependencies:
npm install --save-dev \
@stylistic/eslint-plugin \
@typescript-eslint/eslint-plugin \
eslint-plugin-jsdoc \
eslint-plugin-jsx-a11y \
eslint-plugin-n \
eslint-plugin-react \
eslint-plugin-react-hooks \
eslint-plugin-sonarjsIf you use the Relay preset, also install:
npm install --save-dev eslint-plugin-relayMain Public Surface
Default export
The package default export is an array of ESLint flat config fragments that you
spread into eslint.config.js.
createConfig
Use createConfig({ project }) when your ESLint TypeScript project file is not
at ./tsconfig.eslint.json.
Relay preset
Import @plumile/eslint-config-typescript/relay.js to add Relay-specific
syntax, naming, and colocated fragment checks.
Quick Start
Flat config
import plumileTs from '@plumile/eslint-config-typescript';
export default [
...plumileTs,
{
files: ['src/**/*.ts', 'src/**/*.tsx'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
];Custom TypeScript project
import { createConfig } from '@plumile/eslint-config-typescript';
export default [...createConfig({ project: './tsconfig.eslint.json' })];Relay preset
import plumileTs from '@plumile/eslint-config-typescript';
import relayPreset from '@plumile/eslint-config-typescript/relay.js';
export default [...plumileTs, ...relayPreset];What the Preset Covers
- TypeScript parsing and project-aware linting
- React hooks rules
- accessibility checks
- jsdoc and general code-quality rules
- stylistic rules aligned with the repository expectations
Validation Notes
- public config shape should be covered by tests that load the default config and the Relay preset
- README examples should stay aligned with the exported entry points
Limitations
- this package assumes ESLint flat config as the primary integration model
- legacy
.eslintrcconsumers may still adapt it, but flat config is the documented path - consumers remain responsible for installing the required peer dependencies
