jshint-loader icon indicating copy to clipboard operation
jshint-loader copied to clipboard

Some globals are being ignored from .jshintrc

Open joeljeske opened this issue 8 years ago • 0 comments

Bug Report

I have a project using ES Modules and do not want to support AMD / CommonJS. I can turn this off in the parser settings in Webpack but I want to have JSHint throw an error. If I set the option in my .jshintrc it is ignored.

Example:

// .jshintrc

{
  ...
  "globals": {
    "require": false,
    "define": false,
    "module": false,
    "exports": false
  }
}

// Source file: './index.js'

var myModule = require('my-module');

module.exports = ...

This does not emit an error or warning in the webpack build and I would expect it to.

joeljeske avatar Aug 23 '17 18:08 joeljeske