r/javascript • u/coopermaruyama • Oct 02 '26
Linter for the things a regular linter can't catch
https://github.com/darkmatter/adhere
0
Upvotes
r/javascript • u/coopermaruyama • Oct 02 '26
1
u/RuslanDevs Oct 02 '26
How fast it works on large codebases?
1
u/Positive_Method3022 Oct 02 '26
Why can't this rule be checked by typescript?
description: A port must be a branded, range-checked integer, never a bare number. threshold: 0.8
Why: a bare
numberaccepts 70000 and -1.Must
Never
"What" port should be can be inspected statically in the code base by tsc. That port is of a certain type and it will be used somewhere that should expect( is constrained by) that type. If the place where your port is used isn't constraining (eg. allows Number) then it is a typing problem. The branding can also be typechecked at compile time.