Add eslint `must-use` flag.
See original GitHub issueWhile reading through the docs of Rust’s Result
type, I learned that they annotate Result
with a compiler attribute that enforces a user to “do something” with the result.
It might be nice to introduce an eslint rule that does this for neverthrow.
It would prevent situations like this:
const doSomethingThatMayFail = async () => {
await changeUserPassword() // Returns a `Result<null, DbError>`
}
Note that we haven’t checked to see if changeUserPassword
actually succeeded.
Edit:
Learning Resources:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:20 (15 by maintainers)
Top Results From Across the Web
Getting Started with ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Basic Features: ESLint - Next.js
If you include any ESLint rules that depend on more than the contents of a single source file and need to disable the...
Read more >Enabling the fix flag for stdio · Issue #9076 · eslint/eslint - GitHub
Add a new flag like --fix-dry-run that can be used with --stdin ... and the fixed output at the same time, I'd need...
Read more >Grunt-eslint & enabling `--fix` flag to auto fix violations
For the --fix flag, you only have to add an options: { fix: true } to your gruntfile. Here is an example of...
Read more >How To Lint and Format Code with ESLint in Visual Studio Code
It's important to include the --save-dev flag because this saves the package as a dependency for development usage only. In this case, eslint...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@supermacro is already published since yesterday, the reported issue was a misconfiguration in the package.json file
perfect i hope hear good news from you soon
thank you 😃 I wrote you on twitter, when you finished we can talk about the payment there
Yup i get the idea of create the lib and build the eslint plugin from rust 😃
so as long as any of these methods is called eslint should be happy?