--- url: /quickstart.md description: >- Step-by-step guide to installing @nhtio/eslint-config and creating an eslint.config.mjs for a TypeScript/Vue 3 project. Covers the recommended preset, the configure() function for custom overrides, and withCustomJsdocTags() for extending allowed TypeDoc tags. --- # Quickstart `@nhtio/eslint-config` requires ESLint 9+ (flat config). The two usage patterns are: 1. **Zero-config** — import the `recommended` preset directly. 2. **Custom overrides** — call `configure(...blocks)` and pass your own flat config objects; they are merged before the NHT defaults. The package is ESM-first. Use `eslint.config.mjs` (or `eslint.config.cjs` with `require()`). Using the `@nhtio/eslint-config` is simple and easy. Just follow the steps below: ## Prerequisites * [Node.js](https://nodejs.org/) version 22 or higher. ## Installation You can install `@nhtio/eslint-config` directly from your preferred package manager ::: code-group ```sh [npm] npm i @nhtio/eslint-config@latest -D ``` ```sh [pnpm] pnpm add @nhtio/eslint-config@latest -D ``` ```sh [yarn] yarn add @nhtio/eslint-config@latest -D ``` ::: Then create the eslint configuration file at the root of your project: ::: code-group ```javascript [eslint.config.mjs] import { recommended } from '@nhtio/eslint-config/recommended' export default recommended; ``` ```javascript [eslint.config.cjs] const recommended = require('@nhtio/eslint-config/recommended') module.exports = recommended; ``` ::: Optionally, you can add the following to the `scripts` property of your `package.json`: ```json { ... "scripts": { ... "lint": "eslint .", // [!code focus] ... } ... } ``` ## Customization If you would like to append custom rules to the configuration, you can use the `configure` function from the `@nhtio/eslint-config` package as follows: ::: code-group ```javascript [eslint.config.mjs] import { configure } from '@nhtio/eslint-config' export default configure( // your rules here ); ``` ```javascript [eslint.config.cjs] const configure = require('@nhtio/eslint-config') module.exports = configure( // your rules here ); ``` ::: ## Custom JSDoc Tags The config enforces JSDoc/TypeDoc documentation on exported symbols and validates tag names against the full TypeDoc tag vocabulary. If your project uses additional custom tags beyond what TypeDoc defines, use `withCustomJsdocTags` to extend the allowed set without disabling the rule: ::: code-group ```javascript [eslint.config.mjs] import { configure, withCustomJsdocTags } from '@nhtio/eslint-config' export default configure( withCustomJsdocTags(['myCustomTag', 'anotherTag']), ); ``` ```javascript [eslint.config.cjs] const { configure, withCustomJsdocTags } = require('@nhtio/eslint-config') module.exports = configure( withCustomJsdocTags(['myCustomTag', 'anotherTag']), ); ``` ::: --- --- url: /api/@nhtio/eslint-config.md --- # @nhtio/eslint-config ## Variables | Variable | Description | | ------------------------------- | ----------------------------------- | | [version](variables/version.md) | The current version of the package. | ## Functions | Function | Description | | ----------------------------------- | --------------------------------------------------------------------------- | | [configure](functions/configure.md) | Configures ESLint to use an opinionated config tailored for NHT Development | ## References ### default Renames and re-exports [configure](functions/configure.md) *** ### withCustomJsdocTags Re-exports [withCustomJsdocTags](helpers/jsdocTags/functions/withCustomJsdocTags.md) --- --- url: /api/@nhtio/eslint-config/variables/version.md --- # Variable: version ```ts const version: string = __VERSION__; ``` The current version of the package. ## Tip This is a constant that is replaced during the build process with the actual version of the package. --- --- url: /api/@nhtio/eslint-config/functions/configure.md --- # Function: configure() ```ts function configure(...configBlocksToMerge: Config[]): ConfigArray; ``` Configures ESLint to use an opinionated config tailored for NHT Development ## Parameters | Parameter | Type | Description | | ------------------------ | ---------- | ----------- | | ...`configBlocksToMerge` | `Config`\[] | | ## Returns `ConfigArray` The merged ESLint flat config array --- --- url: /api/@nhtio/eslint-config/blocks.md --- # @nhtio/eslint-config/blocks ## Variables | Variable | Description | | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | [ignore](variables/ignore.md) | An ESLint Configuration for ignoring files and directories | | [json](variables/json.md) | An ESLint Configuration for JSON files | | [markdown](variables/markdown.md) | An ESLint Configuration for markdown documents | | [nht](variables/nht.md) | An ESLint Configuration for Javascript and TypeScript files with the .js, .mjs, .ts, and .mts extensions as well as Vue & Vue + TypeScript files with the .vue extension | | [overrides](variables/overrides.md) | Provides overrides for the NHT ESLint configuration which fix various issues from other configuration blocks | | [plugins](variables/plugins.md) | An ESLint Configuration for loading eslint plugins | | [vueEssential](variables/vueEssential.md) | Rules for Error Prevention when using Vue | | [vueRecommended](variables/vueRecommended.md) | Rules for Potentially Dangerous Patterns when using Vue | | [vueStronglyRecommended](variables/vueStronglyRecommended.md) | Rules for Improving Readability and Code Quality when using Vue | | [vueTypescript](variables/vueTypescript.md) | An ESLint Configuration for Vue + TypeScript files with the .vue extension | --- --- url: /api/@nhtio/eslint-config/blocks/variables/ignore.md --- # Variable: ignore ```ts const ignore: FlatConfig.Config; ``` An ESLint Configuration for ignoring files and directories --- --- url: /api/@nhtio/eslint-config/blocks/variables/json.md --- # Variable: json ```ts const json: FlatConfig.Config; ``` An ESLint Configuration for JSON files --- --- url: /api/@nhtio/eslint-config/blocks/variables/markdown.md --- # Variable: markdown ```ts const markdown: FlatConfig.Config; ``` An ESLint Configuration for markdown documents --- --- url: /api/@nhtio/eslint-config/blocks/variables/nht.md --- # Variable: nht ```ts const nht: FlatConfig.Config; ``` An ESLint Configuration for Javascript and TypeScript files with the .js, .mjs, .ts, and .mts extensions as well as Vue & Vue + TypeScript files with the .vue extension --- --- url: /api/@nhtio/eslint-config/blocks/variables/overrides.md --- # Variable: overrides ```ts const overrides: FlatConfig.Config; ``` Provides overrides for the NHT ESLint configuration which fix various issues from other configuration blocks --- --- url: /api/@nhtio/eslint-config/blocks/variables/plugins.md --- # Variable: plugins ```ts const plugins: FlatConfig.Config; ``` An ESLint Configuration for loading eslint plugins --- --- url: /api/@nhtio/eslint-config/blocks/variables/vueEssential.md --- # Variable: vueEssential ```ts const vueEssential: Config[]; ``` Rules for Error Prevention when using Vue --- --- url: /api/@nhtio/eslint-config/blocks/variables/vueRecommended.md --- # Variable: vueRecommended ```ts const vueRecommended: Config[]; ``` Rules for Potentially Dangerous Patterns when using Vue --- --- url: /api/@nhtio/eslint-config/blocks/variables/vueStronglyRecommended.md --- # Variable: vueStronglyRecommended ```ts const vueStronglyRecommended: Config[]; ``` Rules for Improving Readability and Code Quality when using Vue --- --- url: /api/@nhtio/eslint-config/blocks/variables/vueTypescript.md --- # Variable: vueTypescript ```ts const vueTypescript: FlatConfig.Config; ``` An ESLint Configuration for Vue + TypeScript files with the .vue extension --- --- url: /api/@nhtio/eslint-config/blocks/ignore.md --- # @nhtio/eslint-config/blocks/ignore ## References ### default Renames and re-exports [ignore](../variables/ignore.md) --- --- url: /api/@nhtio/eslint-config/blocks/json.md --- # @nhtio/eslint-config/blocks/json ## References ### default Renames and re-exports [json](../variables/json.md) --- --- url: /api/@nhtio/eslint-config/blocks/markdown.md --- # @nhtio/eslint-config/blocks/markdown ## References ### default Renames and re-exports [markdown](../variables/markdown.md) --- --- url: /api/@nhtio/eslint-config/blocks/nht.md --- # @nhtio/eslint-config/blocks/nht ## References ### default Renames and re-exports [nht](../variables/nht.md) --- --- url: /api/@nhtio/eslint-config/blocks/overrides.md --- # @nhtio/eslint-config/blocks/overrides ## References ### default Renames and re-exports [overrides](../variables/overrides.md) --- --- url: /api/@nhtio/eslint-config/blocks/plugins.md --- # @nhtio/eslint-config/blocks/plugins ## References ### default Renames and re-exports [plugins](../variables/plugins.md) --- --- url: /api/@nhtio/eslint-config/blocks/vue.md --- # @nhtio/eslint-config/blocks/vue ## References ### default Renames and re-exports [vueTypescript](../variables/vueTypescript.md) --- --- url: /api/@nhtio/eslint-config/helpers/jsdocTags.md --- # @nhtio/eslint-config/helpers/jsdocTags ## Functions | Function | Description | | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | [withCustomJsdocTags](functions/withCustomJsdocTags.md) | Returns a partial ESLint flat config block that extends the allowed JSDoc tag list beyond the built-in TypeDoc/TSDoc set. | --- --- url: /api/@nhtio/eslint-config/helpers/jsdocTags/functions/withCustomJsdocTags.md --- # Function: withCustomJsdocTags() ```ts function withCustomJsdocTags(tags: string[]): Config; ``` Returns a partial ESLint flat config block that extends the allowed JSDoc tag list beyond the built-in TypeDoc/TSDoc set. Use this when your project uses custom TypeDoc tags (e.g. `@myCustomTag`) that are not part of the standard TypeDoc tag vocabulary. Add the returned config to your `configure()` call to suppress `jsdoc/check-tag-names` false positives. ## Parameters | Parameter | Type | Description | | --------- | ---------- | ------------------------------------------------------------ | | `tags` | `string`\[] | Array of custom tag names to allow (without the leading `@`) | ## Returns `Config` A partial ESLint flat config block that overrides `jsdoc/check-tag-names` ## Example ```ts import { configure, withCustomJsdocTags } from "@nhtio/eslint-config"; export default configure(withCustomJsdocTags(["myCustomTag", "internal"])); ``` --- --- url: /api/@nhtio/eslint-config/plugins.md --- # @nhtio/eslint-config/plugins ## Variables | Variable | Description | | --------------------------------- | ----------------------------------- | | [jsdoc](variables/jsdoc.md) | The `eslint-plugin-jsdoc` plugin | | [json](variables/json.md) | The `@eslint/json` plugin | | [markdown](variables/markdown.md) | The `@eslint/markdown` plugin | | [nht](variables/nht.md) | Custom Rules provided by NHT | | [node](variables/node.md) | The `eslint-plugin-n` plugin | | [prettier](variables/prettier.md) | The `eslint-plugin-prettier` plugin | | [tseslint](variables/tseslint.md) | The `typescript-eslint` plugin | | [unicorn](variables/unicorn.md) | The `eslint-plugin-unicorn` plugin | --- --- url: /api/@nhtio/eslint-config/plugins/variables/jsdoc.md --- # Variable: jsdoc ```ts const jsdoc: FlatConfig.Plugin; ``` The `eslint-plugin-jsdoc` plugin ## See [eslint-plugin-jsdoc](https://www.npmjs.com/package/eslint-plugin-jsdoc) on NPM --- --- url: /api/@nhtio/eslint-config/plugins/variables/json.md --- # Variable: json ```ts const json: FlatConfig.Plugin; ``` The `@eslint/json` plugin ## See [@eslint/json](https://www.npmjs.com/package/@eslint/json) on NPM --- --- url: /api/@nhtio/eslint-config/plugins/variables/markdown.md --- # Variable: markdown ```ts const markdown: FlatConfig.Plugin; ``` The `@eslint/markdown` plugin ## See [@eslint/markdown](https://www.npmjs.com/package/@eslint/markdown) on NPM --- --- url: /api/@nhtio/eslint-config/plugins/variables/nht.md --- # Variable: nht ```ts const nht: FlatConfig.Plugin; ``` Custom Rules provided by NHT --- --- url: /api/@nhtio/eslint-config/plugins/variables/node.md --- # Variable: node ```ts const node: FlatConfig.Plugin; ``` The `eslint-plugin-n` plugin ## See [eslint-plugin-n](https://www.npmjs.com/package/eslint-plugin-n) on NPM --- --- url: /api/@nhtio/eslint-config/plugins/variables/prettier.md --- # Variable: prettier ```ts const prettier: FlatConfig.Plugin; ``` The `eslint-plugin-prettier` plugin ## See [eslint-plugin-prettier](https://www.npmjs.com/package/eslint-plugin-prettier) on NPM --- --- url: /api/@nhtio/eslint-config/plugins/variables/tseslint.md --- # Variable: tseslint ```ts const tseslint: FlatConfig.Plugin; ``` The `typescript-eslint` plugin ## See [typescript-eslint](https://www.npmjs.com/package/typescript-eslint) on NPM --- --- url: /api/@nhtio/eslint-config/plugins/variables/unicorn.md --- # Variable: unicorn ```ts const unicorn: FlatConfig.Plugin; ``` The `eslint-plugin-unicorn` plugin ## See [eslint-plugin-unicorn](https://www.npmjs.com/package/eslint-plugin-unicorn) on NPM --- --- url: /api/@nhtio/eslint-config/plugins/nht.md --- # @nhtio/eslint-config/plugins/nht ## References ### default Renames and re-exports [nht](../variables/nht.md) --- --- url: /api/@nhtio/eslint-config/recommended.md --- # @nhtio/eslint-config/recommended ## Variables | Variable | Description | | --------------------------------------- | ------------------------------------------------- | | [recommended](variables/recommended.md) | The recommended configuration for NHT Development | ## References ### default Renames and re-exports [recommended](variables/recommended.md) --- --- url: /api/@nhtio/eslint-config/recommended/variables/recommended.md --- # Variable: recommended ```ts const recommended: ConfigArray; ``` The recommended configuration for NHT Development --- --- url: /api/@nhtio/eslint-config/rules.md --- # @nhtio/eslint-config/rules ## Variables | Variable | Description | | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | [noDefaultImport](variables/noDefaultImport.md) | - | | [noInlineTypeImport](variables/noInlineTypeImport.md) | - | | [noUndefinedChildrenForProgrammaticComponents](variables/noUndefinedChildrenForProgrammaticComponents.md) | An ESLint rule that disallows explicitly passing undefined as the children argument in calls to Vue's h function. | | [noWindowNegation](variables/noWindowNegation.md) | ESLint rule to disallow negation of `window` and suggest using `typeof window === "undefined"` instead. | | [preferEcmaPrivacy](variables/preferEcmaPrivacy.md) | - | | [preferProgrammaticComponents](variables/preferProgrammaticComponents.md) | - | | [requireFunctionSlotsForProgrammaticComponents](variables/requireFunctionSlotsForProgrammaticComponents.md) | An ESLint rule that enforces the use of function slots for components rendered using Vue's h function. | | [sortImportsByTypeAndSize](variables/sortImportsByTypeAndSize.md) | - | | [vueFileNotInTsconfig](variables/vueFileNotInTsconfig.md) | - | | [vueprintTypeImportOnly](variables/vueprintTypeImportOnly.md) | An ESLint rule that disallows non-type imports from "@jakguru/vueprint". | --- --- url: /api/@nhtio/eslint-config/rules/variables/noDefaultImport.md --- # Variable: noDefaultImport ```ts const noDefaultImport: RuleModule<"noDefaultImport", [], unknown, RuleListener>; ``` --- --- url: /api/@nhtio/eslint-config/rules/variables/noInlineTypeImport.md --- # Variable: noInlineTypeImport ```ts const noInlineTypeImport: RuleModule< "noInlineTypeImport", [], unknown, RuleListener >; ``` --- --- url: >- /api/@nhtio/eslint-config/rules/variables/noUndefinedChildrenForProgrammaticComponents.md --- # Variable: noUndefinedChildrenForProgrammaticComponents ```ts const noUndefinedChildrenForProgrammaticComponents: RuleModule< "undefinedChildren" | "undefinedChildrenFunction", [], unknown, RuleListener >; ``` An ESLint rule that disallows explicitly passing undefined as the children argument in calls to Vue's h function. --- --- url: /api/@nhtio/eslint-config/rules/variables/noWindowNegation.md --- # Variable: noWindowNegation ```ts const noWindowNegation: RuleModule< "unexpectedNegation", [], unknown, RuleListener >; ``` ESLint rule to disallow negation of `window` and suggest using `typeof window === "undefined"` instead. --- --- url: /api/@nhtio/eslint-config/rules/variables/preferEcmaPrivacy.md --- # Variable: preferEcmaPrivacy ```ts const preferEcmaPrivacy: RuleModule< "preferEcmaPrivacy" | "suggestRename", [], unknown, RuleListener >; ``` --- --- url: /api/@nhtio/eslint-config/rules/variables/preferProgrammaticComponents.md --- # Variable: preferProgrammaticComponents ```ts const preferProgrammaticComponents: RuleModule< "preferProgrammaticComponents", [], unknown, RuleListener >; ``` --- --- url: >- /api/@nhtio/eslint-config/rules/variables/requireFunctionSlotsForProgrammaticComponents.md --- # Variable: requireFunctionSlotsForProgrammaticComponents ```ts const requireFunctionSlotsForProgrammaticComponents: RuleModule< "invalidChildren", [], unknown, RuleListener >; ``` An ESLint rule that enforces the use of function slots for components rendered using Vue's h function. --- --- url: /api/@nhtio/eslint-config/rules/variables/sortImportsByTypeAndSize.md --- # Variable: sortImportsByTypeAndSize ```ts const sortImportsByTypeAndSize: RuleModule< "wrongOrder", [], unknown, RuleListener >; ``` --- --- url: /api/@nhtio/eslint-config/rules/variables/vueFileNotInTsconfig.md --- # Variable: vueFileNotInTsconfig ```ts const vueFileNotInTsconfig: RuleModule< "notInTsconfig", [], unknown, RuleListener >; ``` --- --- url: /api/@nhtio/eslint-config/rules/variables/vueprintTypeImportOnly.md --- # Variable: vueprintTypeImportOnly ```ts const vueprintTypeImportOnly: RuleModule< "nonTypeImport", [], unknown, RuleListener >; ``` An ESLint rule that disallows non-type imports from "@jakguru/vueprint". --- --- url: /api/@nhtio/eslint-config/rules/no_default_import.md --- # @nhtio/eslint-config/rules/no\_default\_import ## References ### default Renames and re-exports [noDefaultImport](../variables/noDefaultImport.md) --- --- url: /api/@nhtio/eslint-config/rules/no_inline_type_import.md --- # @nhtio/eslint-config/rules/no\_inline\_type\_import ## References ### default Renames and re-exports [noInlineTypeImport](../variables/noInlineTypeImport.md) --- --- url: >- /api/@nhtio/eslint-config/rules/no_undefined_children_for_programmatic_components.md --- # @nhtio/eslint-config/rules/no\_undefined\_children\_for\_programmatic\_components ## References ### default Renames and re-exports [noUndefinedChildrenForProgrammaticComponents](../variables/noUndefinedChildrenForProgrammaticComponents.md) --- --- url: /api/@nhtio/eslint-config/rules/no_window_negation.md --- # @nhtio/eslint-config/rules/no\_window\_negation ## References ### default Renames and re-exports [noWindowNegation](../variables/noWindowNegation.md) --- --- url: /api/@nhtio/eslint-config/rules/prefer_ecma_privacy.md --- # @nhtio/eslint-config/rules/prefer\_ecma\_privacy ## References ### default Renames and re-exports [preferEcmaPrivacy](../variables/preferEcmaPrivacy.md) --- --- url: /api/@nhtio/eslint-config/rules/prefer_programmatic_components.md --- # @nhtio/eslint-config/rules/prefer\_programmatic\_components ## References ### default Renames and re-exports [preferProgrammaticComponents](../variables/preferProgrammaticComponents.md) --- --- url: >- /api/@nhtio/eslint-config/rules/require_function_slots_for_programmatic_components.md --- # @nhtio/eslint-config/rules/require\_function\_slots\_for\_programmatic\_components ## References ### default Renames and re-exports [requireFunctionSlotsForProgrammaticComponents](../variables/requireFunctionSlotsForProgrammaticComponents.md) --- --- url: /api/@nhtio/eslint-config/rules/sort_imports_by_type_and_size.md --- # @nhtio/eslint-config/rules/sort\_imports\_by\_type\_and\_size ## References ### default Renames and re-exports [sortImportsByTypeAndSize](../variables/sortImportsByTypeAndSize.md) --- --- url: /api/@nhtio/eslint-config/rules/vue_file_not_in_tsconfig.md --- # @nhtio/eslint-config/rules/vue\_file\_not\_in\_tsconfig ## References ### default Renames and re-exports [vueFileNotInTsconfig](../variables/vueFileNotInTsconfig.md) --- --- url: /api/@nhtio/eslint-config/rules/vueprint_type_import_only.md --- # @nhtio/eslint-config/rules/vueprint\_type\_import\_only ## References ### default Renames and re-exports [vueprintTypeImportOnly](../variables/vueprintTypeImportOnly.md) --- --- url: /api.md --- # @nhtio/eslint-config ## Modules | Module | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | | [@nhtio/eslint-config](@nhtio/eslint-config/index.md) | - | | [@nhtio/eslint-config/blocks](@nhtio/eslint-config/blocks/index.md) | - | | [@nhtio/eslint-config/blocks/ignore](@nhtio/eslint-config/blocks/ignore/index.md) | - | | [@nhtio/eslint-config/blocks/json](@nhtio/eslint-config/blocks/json/index.md) | - | | [@nhtio/eslint-config/blocks/markdown](@nhtio/eslint-config/blocks/markdown/index.md) | - | | [@nhtio/eslint-config/blocks/nht](@nhtio/eslint-config/blocks/nht/index.md) | - | | [@nhtio/eslint-config/blocks/overrides](@nhtio/eslint-config/blocks/overrides/index.md) | - | | [@nhtio/eslint-config/blocks/plugins](@nhtio/eslint-config/blocks/plugins/index.md) | - | | [@nhtio/eslint-config/blocks/vue](@nhtio/eslint-config/blocks/vue/index.md) | - | | [@nhtio/eslint-config/helpers/jsdocTags](@nhtio/eslint-config/helpers/jsdocTags/index.md) | - | | [@nhtio/eslint-config/plugins](@nhtio/eslint-config/plugins/index.md) | - | | [@nhtio/eslint-config/plugins/nht](@nhtio/eslint-config/plugins/nht/index.md) | - | | [@nhtio/eslint-config/recommended](@nhtio/eslint-config/recommended/index.md) | - | | [@nhtio/eslint-config/rules](@nhtio/eslint-config/rules/index.md) | - | | [@nhtio/eslint-config/rules/no\_default\_import](@nhtio/eslint-config/rules/no_default_import/index.md) | - | | [@nhtio/eslint-config/rules/no\_inline\_type\_import](@nhtio/eslint-config/rules/no_inline_type_import/index.md) | - | | [@nhtio/eslint-config/rules/no\_undefined\_children\_for\_programmatic\_components](@nhtio/eslint-config/rules/no_undefined_children_for_programmatic_components/index.md) | - | | [@nhtio/eslint-config/rules/no\_window\_negation](@nhtio/eslint-config/rules/no_window_negation/index.md) | - | | [@nhtio/eslint-config/rules/prefer\_ecma\_privacy](@nhtio/eslint-config/rules/prefer_ecma_privacy/index.md) | - | | [@nhtio/eslint-config/rules/prefer\_programmatic\_components](@nhtio/eslint-config/rules/prefer_programmatic_components/index.md) | - | | [@nhtio/eslint-config/rules/require\_function\_slots\_for\_programmatic\_components](@nhtio/eslint-config/rules/require_function_slots_for_programmatic_components/index.md) | - | | [@nhtio/eslint-config/rules/sort\_imports\_by\_type\_and\_size](@nhtio/eslint-config/rules/sort_imports_by_type_and_size/index.md) | - | | [@nhtio/eslint-config/rules/vue\_file\_not\_in\_tsconfig](@nhtio/eslint-config/rules/vue_file_not_in_tsconfig/index.md) | - | | [@nhtio/eslint-config/rules/vueprint\_type\_import\_only](@nhtio/eslint-config/rules/vueprint_type_import_only/index.md) | - |