4 ms·
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 Eslin
by wildpeaks 10y ago
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).
- dahjelle 10y agoThere'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 https://github.com/prettier/prettier-eslint
- rattray 10y agoFrom 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 https://github.com/prettier/prettier
- crucialfelix 10y agoI use prettier-eslint which (as dahjelle posted) runs prettier (for spacing) then eslint (for syntax fixes). I absolutely love it.