nestjs/typescript-starter

Lint script does not work as expected

tholander opened this issue · 1 comments

Description

With a brand new Nest project, it seems eslint does not lint anything.

Steps to reproduce

  1. create a new Nest project with CLI
$ nest new test-app
  1. change some string from single quotes to double quotes, or add some trailing white spaces
import { Module } from '@nestjs/common';
import { AppController } from "./app.controller";
import { AppService } from "./app.service";

@Module({
  imports: [],
  controllers: [AppController],  
  providers: [AppService],
})  
export class AppModule {}      
  1. run the lint script
$ yarn lint # or npm run lint
  1. nothing has changed in the previously edited file

Actual behavior

It looks like ESLint did not run prettier to clean the files

Expected behavior

I expect the lint script to run eslint with prettier to clean all the project files

If you want to run Prettier as part of the "lint" script, follow these instructions https://prettier.io/docs/en/integrating-with-linters.html#use-eslint-to-run-prettier