4 ms·
Linting not only addresses syntax but also addresses a lot of other issues: - Unused variables (more often an error than not) - Redefining the same variable n
by throwaway2016a 9y ago
Linting not only addresses syntax but also addresses a lot of other issues:
- Unused variables (more often an error than not)
- Redefining the same variable name twice
- Having a class method that doesn't use the "this" keyword (usually a logical error)
I think it is worth keeping those kind of rules on even if you turn off ones like how many spaces at the start of the line.
Linting also isn't just for you. It is for the other people on the team so that they don't have to deal with the B.S. of either "fixing" the 50 lines of code you indented with tabs or dealing with multiple styles in the same file.
Although it is a good point that linters could just fix the formatting rather than just complain for a lot of issues.
Although coincidentally when I started using the AirBnB style guide, it corresponded almost identically to the style I was already using so the shock wasn't there.
The author clearly has a hacker "get shit done" kind of mentality and to an extent I love that. But it would drive me nuts if he was on my team.