nest-cli icon indicating copy to clipboard operation
nest-cli copied to clipboard

Run lint/prettier after generating files

Open mi5ha opened this issue 5 years ago • 3 comments

Hi there,

How can I tell generators to generate files with 4 spaces?

Thank you, Misha

mi5ha avatar Jun 14 '19 06:06 mi5ha

I'm interested in configuring the generate output too but in order to disable the semicolons. I like the two space indentation.

It would be awesome if the CLI were aware of the tslint / eslint conf file.

As a temporary workaround I'm appending this to all my generate commands to achieve a similar result:

nest generate controller foo | awk '{print $2}' | sed 's/\///' | xargs node_modules/tslint/bin/tslint --fix

martinsotirov avatar Jul 01 '19 20:07 martinsotirov

I think its too complex to adjust generator to obey everyone's code styles. Better pipe it through Prettier and thats it

lkostrowski avatar Jul 08 '19 17:07 lkostrowski