eslint-plugin-nestjs-pedantic

0.0.4 • Public • Published

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 🌐 ✅ 💡

Package Sidebar

Install

npm i eslint-plugin-nestjs-pedantic

Weekly Downloads

33

Version

0.0.4

License

MIT

Unpacked Size

22.6 kB

Total Files

18

Last publish

Collaborators

  • ej-shafran