Does JSHint support async/await?

Update (February 2019) : Async/await are now supported as of version 2.10.1. Simply update your .jshintrc to use “esversion”: 9. (+Info : Version changelog) Update (july 2018) : Async/await will arrive with the release of JsHint 2.10.0. +info : https://github.com/jshint/jshint/pull/3273 The JSHINT developing community considers that: JSHINT should first support all the ES6 syntax before … Read more

How to remove global “use strict” added by babel

As it has already been mentioned for Babel 6, it’s the transform-es2015-modules-commonjs preset which adds strict mode. In case you want to use the whole es2015 preset without module transformations, put this in your .babelrc file: { “presets”: [ [“es2015”, { “modules”: false }] ] } This will disable modules and strict mode, while keeping … Read more

Why is Jshint saying “variable already defined” in this if statement?

JS variables do not have block scope, they have “function” scope (or sometimes global). The declaration (but not the assignment) is “hoisted” to the top of the function. jshint is warning you that you have two such declarations – your code is equivalent to: var someVar; var someVar; // warning! if (something) { someVar = … Read more

Is it bad practice to use the same variable name in multiple for-loops?

Since variable declarations are hoisted to the top of the scope in which they appear the interpreter will effectively interpret both versions in the same way. For that reason, JSHint and JSLint suggest moving the declarations out of the loop initialiser. The following code… for (var i = 0; i < 10; i++) {} for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)