lodash - error '_' is not defined no-undef -
i use eslint check code ,and error happen -- "error '_' not defined no-undef".
i write code this:
new webpack.provideplugin({ $: "jquery",//jquery jquery: "jquery", "window.jquery": "jquery", _:"lodash"//lodash })
and .eslintrc.js, part of this:
"env": { "browser": true, "commonjs": true, "es6": true, "jquery":true, },
before add jquery ,it happen error -- "error '_' not defined no-undef". however, when add lodash ,just "'lodash':true".it doesn't work.
can me?
eslint doesn't understand lodash library. need add global section in config.
"globals": { "_": true },
Comments
Post a Comment