5 ms·
If you are writing JS/TS, I highly recommend you try writing your own custom linter rules. It's quite simple and it's a great way to establish "architecture ass
by kristiandupont 5y ago
If you are writing JS/TS, I highly recommend you try writing your own custom linter rules. It's quite simple and it's a great way to establish "architecture assertions". Use this tool (set the parser to ESLint): https://astexplorer.net/ https://astexplorer.net/
I feel that linting has a lot of potential and is currently underappreciated. You can create rules that are heavily semantic in a way that would be impossible or extremely hard using a type system. Add to that that you can give useful error messages that include links! A type system might allow you to express an invariant, but when it's broken, it can be very hard to understand and communicate what the problem (let alone the solution!) is.
Finally, like the article touches on, linter errors can easily be ignored which means that you only have to get them, say, 80% right to add value. If an error appears somewhere you don't intend, you just ignore it with a comment.
- throw_m239339 5y ago> If you are writing JS/TS, I can strongly recommend trying to write your own custom liter rules. It's quite simple and it's a great way to establish "architecture assertions". Use this tool (set the parser to ESLint): https://astexplorer.net/ https://astexplorer.net/ Goland devs have been doing that since the inception of the language since the standard library ships with a Go parser. It's a no brainer for modern languages. Code reviews shouldn't be spent catching formatting errors or naming conventions and coding guideline enforcement should be fully automated on a continuous integration server.