Conversation
| title: Disallow shorthand type conversions | ||
| tags: [good-practice] | ||
| --- | ||
| This matches the [eslint rule](https://eslint.org/docs/latest/rules/no-implicit-coercion). |
There was a problem hiding this comment.
There's a lot more logic from the eslint rule that would be needed to make this correct. It's probably not useful tbh.
There was a problem hiding this comment.
@morgante I found it very useful for readability. I ran it on an internal project +200 matches, it went smoothly. can you give an example ?
There was a problem hiding this comment.
If you look in the eslint source it does more checks to ensure things like booleans aren't doubly cast. If you want to take the time to mirror that logic, I don't object - but most people will probably still just use eslint or biome.
There was a problem hiding this comment.
@morgante I actually just noticed I took the branch from the other feature (no implicit coercion). I'll split the PR. I'll also check the ESlint source, but probably gonna look for another rule
0501826 to
ca29cd9
Compare
4f27da6 to
981bfce
Compare
https://app.grit.io/studio?key=fsNvFDGI4px3u5p7VdAQZ