Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
GORRILA
on April 21, 2021
|
parent
|
context
|
favorite
| on:
Starting a TypeScript Project in 2021
Two common rules I like to enforce are no nested ternaries and no unused variables.
maga
on April 21, 2021
[–]
tsconfig's noUnusedLocals can help you with the last one.
city41
on April 21, 2021
|
parent
[–]
And it allows you to opt out when needed by starting the variable with an underscore, which is much nicer than eslint-disable-next-line...
DEiE
on April 21, 2021
|
root
|
parent
[–]
That's configurable in the rule though.
https://eslint.org/docs/rules/no-unused-vars#varsignorepatte...
city41
on April 21, 2021
|
root
|
parent
[–]
Ah nice, I didn't know that. Thanks.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: