@theholocron/eslint-config
v7.22.0
Published
A ESLint configuration for writing well-formed Javascript within the Galaxy.
Maintainers
Readme
ESLint Config
A ESLint configuration for writing well-formed JavaScript and TypeScript.
Installation
pnpm add -D @theholocron/eslint-configInstall only the peer dependencies for the presets you use (all are optional except the core):
# Core (always required)
pnpm add -D @eslint/js eslint globals
# TypeScript
pnpm add -D typescript-eslint
# React
pnpm add -D eslint-plugin-react
# Next.js
pnpm add -D @next/eslint-plugin-next
# Node.js
pnpm add -D eslint-plugin-n
# Vitest
pnpm add -D @vitest/eslint-plugin
# Storybook
pnpm add -D eslint-plugin-storybook
# Cypress
pnpm add -D eslint-plugin-cypressUsage
Individual presets
Each preset is a separate subpath import so only its plugin loads — importing
base won't pull in React or Cypress plugins you don't use.
base and typescript are available from the root:
import { base, typescript } from "@theholocron/eslint-config";
export default [...base(), ...typescript()];All other presets use subpath imports:
import { node } from "@theholocron/eslint-config/node";
import { react } from "@theholocron/eslint-config/react";
import { vitest } from "@theholocron/eslint-config/vitest";
import { next } from "@theholocron/eslint-config/next";
import { storybook } from "@theholocron/eslint-config/storybook";
import { cypress } from "@theholocron/eslint-config/cypress";Bundles
Bundles combine presets and peer plugins into a single import for common project types. Use these when you want a ready-made config with no manual composition:
// React app (base + typescript + react + storybook + vitest)
import { reactApp } from "@theholocron/eslint-config/bundles/react-app";
export default [...reactApp()];
// Next.js app (base + typescript + react + next + vitest)
import { nextApp } from "@theholocron/eslint-config/bundles/next-app";
export default [...nextApp()];
// Node.js app or CLI (base + typescript + node + vitest)
import { nodeApp } from "@theholocron/eslint-config/bundles/node-app";
export default [...nodeApp()];
// Publishable library (base + typescript + vitest)
import { library } from "@theholocron/eslint-config/bundles/library";
export default [...library()];Add project-specific configs after the bundle — they are merged in order:
import { reactApp } from "@theholocron/eslint-config/bundles/react-app";
import { cypress } from "@theholocron/eslint-config/cypress";
export default [...reactApp(), ...cypress(), { settings: { react: { version: "detect" } } }];ESLint version
Requires ESLint v10. The react preset wraps eslint-plugin-react with @eslint/compat's fixupConfigRules to patch APIs removed in ESLint v10 — no extra config needed.
