How to disable the warning 'define' is not defined using JSHint and RequireJS

前端 未结 8 1696
温柔的废话
温柔的废话 2020-11-29 19:21

I uses RequireJS AMD in my project. When i run jshint on my project, it throws error like

In AMD Scripts

 \'define\' is not defined.
<
8条回答
  •  孤城傲影
    2020-11-29 19:53

    If you are working on node js. Add these two lines in the beginning of your file

    /*jslint node: true */
    "use strict";
    

提交回复
热议问题