Lint script does not work as expected
tholander opened this issue · 1 comments
tholander commented
Description
With a brand new Nest project, it seems eslint does not lint anything.
Steps to reproduce
- create a new Nest project with CLI
$ nest new test-app
- 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 {}
- run the lint script
$ yarn lint # or npm run lint
- 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
kamilmysliwiec commented
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