Nitpicky ESLint rules.
npm install -D eslint typescript-eslint eslint-plugin-nestjs-pedantic
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.
💼 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 |
🌐 ✅ | 💡 |