eslint-plugin-nestjs-pedantic
v0.0.4
Published
An ESLint plugin for NestJS, with pedantic rules
Downloads
539
Maintainers
Readme
eslint-plugin-nestjs-pedantic
Nitpicky ESLint rules.
Installation
npm install -D eslint eslint-plugin-nestjs-pedantic
Configuration
Old (.eslintrc.*
)
module.exports = {
// ...
plugins: [
// ...
"nestjs-pedantic",
],
extends: [
// ...
"nestjs-pedantic/recommended",
],
};
New (eslint.config.js
)
Either use one of the configs in eslint-plugin-nestjs-pedantic/lib/configs
or import the plugin as a standalone from eslint-plugin-nestjs-pedantic
.
const nestjsPedanticRecommended = require("eslint-plugin-nestjs-pedantic/lib/configs/recommended");
module.exports = {
// ...
...nestjsPedanticRecommended,
};
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 | 🌐 ✅ | 🔧 | |
| route-convention | Keep a convention when decorating routes | 🌐 ✅ | 🔧 | 💡 |
| safe-route-params | Ensure safe usage of the @Param
decorator | 🌐 ✅ | | 💡 |