I recently started using ESLint and successfully integrated it with IntelliJ.
Initially, ESLint did not recognize node
out of the box. After consulting the documentation, I created a configuration file named .eslintrc
at the project's root folder, specified the setting "node":true
, and now ESLint recognizes node
. Here is an example of the complete .eslintrc
file:
// Contents of .eslintrc at root of project - support for Node and jQuery
{
"env" : {
"node" : true,
"jquery" : true
},
}
However, ESLint still does not recognize require()
. I tried adding "amd":false
to the .eslintrc
file as suggested in this resource, but it did not work.
I have searched for a solution to get ESLint
to recognize require()
without success. Can anyone provide guidance on how to achieve this?
(Any additional insights on handling more general cases would also be appreciated. Thank you!)