Ah ESLint, the most necessary bane of my existence. Good work to the team for the update.
I just could not deal with such an opinionated tool. ESLint would not let us adjust settings to accept some of our normal convection's and company code style guidelines. I switched to jshint and have lived a much happier life.
ESLint 7.0
41–50 of 93 posts
Re: ESLint 7.0
#42There is a rule in eslint that warns you when a promise is dangling and hasn't been handled. Please use that rule . So many bugs in the JS world is because of dangling promises.
Re: ESLint 7.0
#43Earlier quoted context omitted.
But until recently an unhandled promise failure was NOT a thrown error, and when it is it's not the error you want.
There is a saying - what you don't know can't hurt you. The idea of Promises comes from strongly typed static functional languages. Adding it to JavaScript was a terrible idea. Like with static modules - forcing the user to download the whole website/app before anything is rendered on the screen.
You're mixing so many different things right now.
Re: ESLint 7.0
#44Earlier quoted context omitted.
And if you are working in a team it makes those arguments about styling moot. One of the best aspects of JavaScript.
Yeah that’s what I mean about PRs - such a time saver to not discuss trivial code style issues and be able to just focus on the code itself!
Re: ESLint 7.0
#45I didn't like programming in JavaScript so much because I think the syntax makes it a little harder to read than necessary. However, I confess that after adopting ESLint in my workflow, things have improved considerably. I can ask it to warn me on unused stuff, to enforce the lack of semicolons, to format and indent my code correctly on save... it's a very useful tool. If you have something against JavaScript in gene…
You can do most of that without ESLint for any programming language with an IDE. Speaking about jetbrains intellij/pycharm from my own experience.
Re: ESLint 7.0
#46Earlier quoted context omitted.
I just could not deal with such an opinionated tool. ESLint would not let us adjust settings to accept some of our normal convection's and company code style guidelines. I switched to jshint and have lived a much happier life.
I feel this way but about `prettier.js` (as opposed to eslint.js) instead.
Re: ESLint 7.0
#47There is a rule in eslint that warns you when a promise is dangling and hasn't been handled. Please use that rule . So many bugs in the JS world is because of dangling promises.
Please don't use uppercase for emphasis. If you want to emphasize a word or phrase, put asterisks around it and it will get italicized. https://news.ycombinator.com/newsguidelines.html .
Re: ESLint 7.0
#48Earlier quoted context omitted.
I think that's part of the typescript plugin, not part of eslint core - https://github.com/typescript-eslint/typescript-eslint/blob/... (I assume that means it only works on TypeScript.) But, I agree with your point, that rule can catch a lot of bugs.
There are many ways to get this rule, but the primary one being: https://www.npmjs.com/package/eslint-plugin-promise
Re: ESLint 7.0
#49There is a rule in eslint that warns you when a promise is dangling and hasn't been handled. Please use that rule . So many bugs in the JS world is because of dangling promises.
hundreds of rules to read, is this on its recommended list if it's so critical? is its name 'no-floating-promises'?
Not now, but it's planned to be starting with the next major version. They are holding off until then since changing the default rules is considered a breaking change.
https://github.com/typescript-eslint/typescript-eslint/issue...