2

JavaScript still doesn't have proper types, but eslint insists that I should use let and const instead of var. Thanks for the hint, but when I care to code properly, I will use TypeScript, otherwise I don't care.

Wish the warnings in my editor would be more helpful with less noise by default, without taking time and effort to tune their settings.

Comments
  • 2
    Maybe you should start using let when working in js...
    I like that variables are scoped. Makes coding easier and clean for others.
  • 1
    @Grumm agree, but that would be the kind of work that _should_ be done in TypeScript.

    I wrote a small script with 1 function invoked onclick to prove that some kind of custom code actually works in a WebFlow project. Maybe that kind of environment had made me write code like it's 2001 in the first place (even avoiding arrow functions, being too lazy to visit caniuse.com)
  • 0
    @fraktalisman It depends on the amount of code.
    For a simple website, I would go with javascript.
    Compiling typescript is not always a good thing imo.
  • 0
    Because in JavaScript or typescript vars get hoisted...
  • 1
    "let" is about scoping, not typing. Not sure why you'd avoid it - on the occasions I do have to work with JS, I'll take any language feature I can to make it the slightest bit more sane to work with.
  • 0
    npm r eslint
  • 1
    @molaram if it wasn't real (programming) language it wouldn't do anything
  • 0
    When i know that I don't need scoping stuff i write "var", you can't just forget about that keyword
Add Comment