@hearthforge/eslint-config
v0.1.2
Published
Shared ESLint flat configs (base, NestJS, React) for HearthForge workspaces
Maintainers
Readme
@hearthforge/eslint-config
The ESLint flat configs every HearthForge workspace and game plugin lints with. Three base presets — plain TypeScript, NestJS and React — built on @eslint/js and typescript-eslint (with no-explicit-any as an error), plus opt-in gates that encode the project's rules as lint: i18nConfig refuses user-facing copy that is not routed through i18n, ssrDatesConfig refuses dates formatted with the runtime's default zone (an SSR hydration mismatch), and scrollportsConfig guards the pinned-surface layout contract. A plugin that lints with these presets is held to the same bar as core.
Install
pnpm add -D @hearthforge/eslint-config eslint typescriptNode >= 22.
Usage
// eslint.config.js
import { config as baseConfig } from "@hearthforge/eslint-config/base";
import { i18nConfig } from "@hearthforge/eslint-config/i18n";
export default [...baseConfig, i18nConfig];| entry | exports |
|---|---|
| @hearthforge/eslint-config/base | config — TypeScript, Node globals |
| @hearthforge/eslint-config/nestjs | config — TypeScript for NestJS services |
| @hearthforge/eslint-config/react | config — TypeScript + eslint-plugin-react-hooks recommended, browser globals |
| @hearthforge/eslint-config/i18n | i18nConfig (every .tsx), i18nTsFiles(globs), i18nServerTs(globs?) |
| @hearthforge/eslint-config/ssr-dates | ssrDatesConfig |
| @hearthforge/eslint-config/scrollports | scrollportsConfig |
The plugins the presets use (@eslint/js, typescript-eslint, eslint-plugin-react-hooks, globals) are regular dependencies of this package, so you install nothing else.
Peer dependencies
| peer | range |
|---|---|
| eslint | >=10.0.0 <11 |
| typescript | >=5.0.0 <6 |
Versioning
Pre-1.0: a minor release may turn on a rule that fails code which passed before; a patch never does. Maintenance lines publish from release/X.Y branches under the release-X.Y npm dist-tag and never move latest — see Maintenance releases.
License
Apache-2.0.
Links
- Repository: hearthforge/hearthforge-sdk
- Contributing: CLA.md (required for every contribution)
- HearthForge core: hearthforge/hearthforge
