@apitree.cz/eslint-config
v0.7.5
Published
ESLint configuration for ApiTree projects.
Readme
ESLint Config
ESLint configuration for ApiTree projects
Installation
pnpm add --save-dev @apitree.cz/eslint-config eslintPNPM Monorepos
Prior to the installation, add the following to your repository root pnpm-workspace.yaml:
publicHoistPattern:
- '*eslint*'Install and use the package in the root only.
Usage
Use one of the following configurations in your repository's root eslint.config.js file.
Base
Suitable for general TypeScript projects.
export { base as default } from '@apitree.cz/eslint-config';React
Necessary for React (JSX/MDX) projects.
import { base, react } from '@apitree.cz/eslint-config';
import { defineConfig } from 'eslint/config';
export default defineConfig(base, react);Next.js
Next.js configuration requires specifying path to app(s).
import { base, react, nextjs } from '@apitree.cz/eslint-config';
import { defineConfig } from 'eslint/config';
export default defineConfig(base, react, nextjs(['apps/<nextjs-app>']));Omit the apps array if you have a single Next.js app repository (no monorepo).
Nest.js
Nest.js configuration requires specifying path to app(s).
import { base, nestjs } from '@apitree.cz/eslint-config';
import { defineConfig } from 'eslint/config';
export default defineConfig(base, nestjs(['apps/<nestjs-app>']));Omit the apps array if you have a single Nest.js app repository (no monorepo).
Storybook
Necessary for projects containing Storybook instance.
import { base, react, storybook } from '@apitree.cz/eslint-config';
import { defineConfig } from 'eslint/config';
export default defineConfig(base, react, storybook);IntelliJ IDE Setup
Following IntelliJ IDEs setup is recommended for the best developer experience:
Recommended Values
✅ Automatic ESLint configuration
Run for files
{**/*,*}.{js,mdx,ts,tsx}