4 ms·
How does it compare to Prettier?
by k__ 10y ago
How does it compare to Prettier?
- 0xCMP 10y agoI believe this is just a standard set of rules for ESLint but Prettier is more like gofmt for javascript. Last I used it Prettier it was very opinionated, but I think you can override it with ESLint rules now which you could use StandardJS to do without needing to write your own.
- Lazare 10y agoHonestly, Prettier attempts to solve the same problem and does it better.
- timdorr 10y agoPrettier is a formatter. It doesn't check for errors, it merely parses JS and enforces a style. It actively corrects any style problems that are found. Standard is a linter (ESLint) configuration and frontend. It doesn't correct errors, just checks for them. It goes beyond style to actually check for logical errors (usage of deprecated APIs, invalid regexps, etc). In theory, you can run the two together. Ideally, you'd use plain ESLint with a config geared around catching programming errors, and leave Prettier for just styling concerns.