3 ms·
Auto-formatting is great, but it can't handle everything. For example, our ESLint config prevents modification of function params[1]. I don't think a tool could
by kevan 11y ago
Auto-formatting is great, but it can't handle everything. For example, our ESLint config prevents modification of function params[1]. I don't think a tool could automatically reformat this into compliance without changing the behavior of the code, a human needs to look at the failure and change it.
[1]http://eslint.org/docs/rules/no-param-reassign.html http://eslint.org/docs/rules/no-param-reassign.html
- matt_wulfeck 11y agoThat's a ultimately a "problem" with the initial language design. If you design it with the intention of using auto formatters you won't run into these issues. I originally didn't like braces in go, but then I realized there's just enough in there to make auto-formatting easy.
- 50CNT 11y agoI think language design may be too strong a term for a lot of web technology. That's where you want to be using a linter and/or validator though.