Package detail

eslint-plugin-nestjs-pedantic

ej-shafran1.8kMIT0.0.14

An ESLint plugin for NestJS, with pedantic rules

eslint, eslintplugin, javascript, typescript

readme

eslint-plugin-nestjs-pedantic

Nitpicky ESLint rules.

Installation

npm install -D eslint typescript-eslint eslint-plugin-nestjs-pedantic

Configuration

To use the recommended configuration:

import nestjsPedantic from "eslint-plugin-nestjs-pedantic";

export default [
  // ...
  ...nestjsPedantic.configs.recommended,
];

To turn on every rule:

import nestjsPedantic from "eslint-plugin-nestjs-pedantic";

export default [
  // ...
  ...nestjsPedantic.configs.all,
];

See more: Configuring Plugins.

Rules

💼 Configurations enabled in.\ 🌐 Set in the all configuration.\ ✅ Set in the recommended configuration.\ 🔧 Automatically fixable by the --fix CLI option.\ 💡 Manually fixable by editor suggestions.

Name Description 💼 🔧 💡
match-methods-to-routes Match method names to the decorated API routes 🌐 ✅ 🔧
no-duplicate-route-params Disallow duplicate route parameters 🌐 ✅
no-unused-route-params Disallow unused route parameters 🌐 ✅ 💡
route-convention Keep a convention when decorating routes 🌐 ✅ 🔧 💡
safe-route-params Ensure safe usage of the @Param decorator 🌐 ✅ 💡