Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Beautify js code in atom editor on save according to eslint configuration

I am using Atom as my code editor of choice and am finding it hard to implement functionality to beautify code. I am relying quite heavily on eslint package and just got beautify to clean up my code on save. issue is that once code is beautified it results in some minor eslint errors and I am looking for a way to either set up beautify plugin in a way that respects eslint rules or use something else that does the job.

like image 557
Ilja Avatar asked Mar 29 '16 11:03

Ilja


Video Answer


1 Answers

You may want to use an Atom plugin called Prettier Eslint that formats code according to eslint config file (.eslintrc). It uses eslint's --fix flag to fix issues.

Edit: Looks like its Prettier-atom now. Thanks, @dube.

like image 100
Nitin Jadhav Avatar answered Oct 20 '22 01:10

Nitin Jadhav