{"id":19547,"library":"eslint-config-nestjs","title":"eslint-config-nestjs","description":"An ESLint configuration preset extracted from the official NestJS TypeScript starter. Version 0.8.0 consolidates ESLint, TypeScript-ESLint, Prettier, and other plugins into a single shareable config, reducing direct dependencies. It is distributed as an npm package and updated occasionally. Unlike manually wiring up @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint-config-prettier, eslint-plugin-prettier, and prettier, this preset provides a one-line extend and automatic plugin resolution, though it offers limited customization out of the box.","status":"active","version":"0.8.0","language":"javascript","source_language":"en","source_url":"https://github.com/daopk/eslint-config-nestjs","tags":["javascript"],"install":[{"cmd":"npm install eslint-config-nestjs","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-nestjs","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-nestjs","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for ESLint to function","package":"eslint","optional":false},{"reason":"provides TypeScript-specific lint rules","package":"@typescript-eslint/eslint-plugin","optional":false},{"reason":"parses TypeScript code for ESLint","package":"@typescript-eslint/parser","optional":false},{"reason":"disables rules that conflict with Prettier","package":"eslint-config-prettier","optional":false},{"reason":"runs Prettier as an ESLint rule","package":"eslint-plugin-prettier","optional":false},{"reason":"peer dependency for eslint-plugin-prettier","package":"prettier","optional":false}],"imports":[{"note":"The preset name is 'nestjs' (without the eslint-config- prefix) as per ESLint's resolution rules. Using the full scoped name will fail.","wrong":"extends: 'eslint-config-nestjs'","symbol":"eslint-config-nestjs","correct":"extends: 'nestjs' in .eslintrc.js"},{"note":"This package is a shareable config, not a plugin. Direct require() does not work; use `extends` in ESLint config.","wrong":"module.exports = require('eslint-config-nestjs')","symbol":"default config","correct":"module.exports = { extends: 'nestjs' }"},{"note":"The preset already includes the required plugins. Adding them manually may cause duplication or conflicts.","wrong":"plugins: ['@typescript-eslint', 'prettier'] in user config","symbol":"plugins","correct":"ESLint automatically resolves plugins when extending 'nestjs'"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  extends: 'nestjs',\n  parserOptions: {\n    project: './tsconfig.json',\n  },\n};\n\n// Install peer dependencies (if not auto-installed)\n// npm i -D eslint-config-nestjs eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-prettier prettier\n\n// Run ESLint:\n// npx eslint \"src/**/*.ts\"","lang":"javascript","description":"Minimal ESLint config using the nestjs preset, including parser options for TypeScript project. Shows how to extend the preset and run ESLint."},"warnings":[{"fix":"Run `npm i -D eslint-config-nestjs @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-prettier prettier`.\"","message":"The preset's peer dependencies may not be automatically installed by npm/pnpm. Ensure all peer dependencies are present.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Verify eslint-config-nestjs is in node_modules and check ESLint's config resolution by running `npx eslint --print-config src/index.ts`.\"","message":"Using 'extends: 'nestjs'' in .eslintrc.js will be ignored if the preset is not installed or if ESLint cannot resolve the configuration.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Disable the plugin by adding `'prettier/prettier': 'off'` in rules.","message":"The preset includes `eslint-plugin-prettier` which may cause performance issues on large projects. Consider using Prettier as a separate formatter.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'/eslint-plugin':52 '/parser':56 '0.8.0':17 'automat':76 'box':87 'config':3,31,59 'configur':7 'consolid':18 'custom':83 'depend':34 'direct':33 'distribut':37 'eslint':2,6,19,22,51,55,58,62 'eslint-config-nestj':1 'eslint-config-pretti':57 'eslint-plugin-pretti':61 'extend':74 'extract':9 'javascript':88 'limit':82 'line':73 'manual':46 'nestj':4,13 'npm':40 'occasion':44 'offer':81 'offici':12 'one':72 'one-lin':71 'packag':41 'plugin':26,63,77 'preset':8,68 'prettier':23,60,64,66 'provid':69 'reduc':32 'resolut':78 'shareabl':30 'singl':29 'starter':15 'though':79 'typescript':14,21,50,54 'typescript-eslint':20,49,53 'unlik':45 'updat':43 'version':16 'wire':47","created_at":"2026-04-25T11:18:22.356957+00:00","updated_at":"2026-04-25T11:18:22.356957+00:00","problems":[{"fix":"Install the package: `npm i -D eslint-config-nestjs`.\"","cause":"The eslint-config-nestjs package is not installed or not in node_modules.","error":"ESLint couldn't find the config \"nestjs\""},{"fix":"Install peer dependency: `npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser`.\"","cause":"Missing peer dependency @typescript-eslint/eslint-plugin.","error":"Failed to load plugin '@typescript-eslint' declared in 'nestjs': Cannot find module '@typescript-eslint/eslint-plugin'"},{"fix":"Install the missing plugin: `npm i -D eslint-plugin-prettier prettier`.\"","cause":"eslint-plugin-prettier is not installed.","error":"Definition for rule 'prettier/prettier' was not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/daopk/eslint-config-nestjs","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-config-nestjs","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}