How to disable the ‘Unexpected console statement.’ (no-console) in Eslint?

To disable the ‘Unexpected console statement.’ (no-console) error in Eslint, you require to add a rule in the .eslintrc.json file. In the rules section of the .eslintrc.json file add the following line: “no-console”:0 This will disable the error. You could do instead: “no-console”: “off” This would do the same thing, which is turn off any…

Read More

How to fix the Node JS “SyntaxError: Unexpected token import” when using JavaScript modules

In order for node to export modules you have to assign each function, object or variable, that requires to be exported, as properties of the modules.exports object.   Exporting In this example the module file is robot.js.  Each function, object or variable we would like to make available to other files we make them properties…

Read More