-
Notifications
You must be signed in to change notification settings - Fork 659
no-unnecessary-type-assertion
, no-unnecessary-type-assertion
#4050
Comments
We don't have type information currently. |
@xunilrj Sorry for bothering you. Is there a future roadmap for type information? I'd like to know more about how Rome plans to implement type-related rules like typescript-eslint. Thanks |
Yes. We are currently researching interesting type aware lints and what implementation would they need. The lint examples also looks not realistic to me. Would be interesting to see real use cases of this rule. |
Yeah the examples in the link are poor. it’s more like: ‘’’ This kind of unneeded type declaration adds noise to the code |
Nice. These I think we can do. |
@xunilrj Is there an issue for tracking the type info feature? This is so important to me that I'd like to know when it will be available so that I can move my projects to Rome. Thanks |
Not yet. I am still researching about type aware lints. |
@xunilrj Edited: For a real-world use case: import fs from "node:fs/promises";
(async () => {
fs.writeFile(...);
// ^ oops, I forgot to write `await`
// do something with that file
})(); |
@xunilrj
a single promise rule could merge several promise-related rules? I could merge the following recommended rule into a single rule I could also add the following
And the following rules:
Rome could implement a "simple" type system (ignoring advanced type features such as mapped types, conditional types, interface merging). |
Just for reference: the TS team is discussing which semantic rule is worth the linting time. |
👋 @rome/staff please triage this issue by adding one of the following labels: |
just got caught out by something that switch-exhaustiveness-check would have prevented. I think just a simple type checking system capable of unioning literals or something would be plenty... no need to go full on |
One great benefit of While I can use Rome for linting development builds. Without this rule it is not feasible for me to use it for production builds. |
Description
https://typescript-eslint.io/rules/no-unnecessary-type-assertion/
The text was updated successfully, but these errors were encountered: