Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint script does not work as expected #168

Closed
tholander opened this issue May 17, 2020 · 1 comment
Closed

Lint script does not work as expected #168

tholander opened this issue May 17, 2020 · 1 comment

Comments

@tholander
Copy link

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

@kamilmysliwiec
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants