Skip to content

Latest commit

 

History

History

plugin-nestjs

Folders and files

README.md

@putout/plugin-nestjs NPM version

Nest is a modern framework designed to build efficient, scalable web applications

(c) nestjs.com

🐊Putout plugin adds ability tosupport nestjs. Not Bundled.

Install

npm i putout @putout/plugin-nestjs -D

Rules

Config

{
    "rules": {
        "nestjs/declare": "on"
    },
    "plugin": ["nestjs"]
}

declare

Add Nestjs declaration on top of a file.

Checkout in 🐊Putout Editor.

❌ Example of incorrect code

@Injectable()
export class GistService {
    constructor(private readonly githubService: GithubService) {}
    
    load(gistId: string, revisionId?: string) {
        return this.githubService.load(gistId, revisionId);
    }
}

✅ Example of correct code

import {Injectable} from '@nestjs/common';

@Injectable()
export class GistService {
    constructor(private readonly githubService: GithubService) {}
    
    load(gistId: string, revisionId?: string) {
        return this.githubService.load(gistId, revisionId);
    }
}

License

MIT