ESLint dollar($) is not defined. (no-undef)
Solution 1:
You are missing
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jquery": true
},
$
is not declared as a global without jquery
environment enabled. Because of that, you are getting a no-undef
error, saying that you are using variable that haven't been declared.
Solution 2:
https://eslint.org/docs/user-guide/configuring#specifying-environments
You can specify environments using a comment inside of your JavaScript file, use the following format:
Add the line below as a comment at the beginning of your JavaScript file.
/* eslint-env jquery */
The eslinter will stop throwing undefined on '$' because it will know you are working with jQuery.