Documentation

ESLint monorepo

Use the Plumile ESLint config across multiple TypeScript projects and Relay apps.

Monorepos often need one ESLint config that points at several TypeScript project files. Use createConfig({ project }), then append the Relay preset and narrow application-specific overrides.

import { createConfig } from '@plumile/eslint-config-typescript';
import relayPreset from '@plumile/eslint-config-typescript/relay.js';

export default [
  {
    ignores: ['**/storybook-static/**', '**/dist/**'],
  },
  ...createConfig({
    project: [
      './tsconfig.eslint.json',
      './apps/public/tsconfig.json',
      './apps/backoffice/tsconfig.json',
      './packages/shared/tsconfig.json',
    ],
  }),
  ...relayPreset,
  {
    files: ['apps/backoffice/**/*.{ts,tsx}'],
    rules: {
      // Example: backoffice-generated fragments can be handled separately.
      'relay/unused-fields': 'off',
    },
  },
  {
    files: ['apps/**/src/**/*.tsx'],
    rules: {
      // Keep overrides narrow and documented.
      'func-style': 'off',
    },
  },
];

Do not use overrides as a broad escape hatch. If an exception applies only to generated files, Relay fragments, or a migration folder, scope the glob to that area.

For repository contribution expectations, see Contributing.