Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It would be useful to compare with "eslint --fix" given Eslint can already reformat (on top of linting non-style things, and projects usually already have Eslint settings).


From the readme:

Unlike ESLint ... everything is fixable. This works because Prettier never "checks" anything; it ... parses your JavaScript into an AST (Abstract Syntax Tree) and pretty-prints the AST, completely ignoring any of the original formatting.

There's an extremely important piece missing from existing styling tools: the maximum line length ... (ESLint never knows how to fix it).

https://github.com/prettier/prettier


There's also prettier-eslint[1], which will run prettier and then eslint --fix on your code to try give you the best of both worlds.

[1] https://github.com/prettier/prettier-eslint


I use prettier-eslint which (as dahjelle posted) runs prettier (for spacing) then eslint (for syntax fixes). I absolutely love it.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: