Hacker News new | ask | show | jobs
by robertrbairdii 1686 days ago
There's definitely a benefit to using a linter and a tool such as prettier. Using prettier pushes the hidden character onto an additional line in the checkCommands array which makes it much easier to spot that something is wrong even if you're not using the trailingCommas setting.

https://imgur.com/a/gYKylyH

I think this eslint rule would also be able to defend against the initial destructuring of the query object by defining a regex that identifiers have to match which would exclude those invisible characters https://eslint.org/docs/rules/id-match

1 comments

Indeed, this wouldn't even compile in Go.