Why eslint report Resolve error: unable to load resolver "webpack"?

Viewed 1614

This is my .eslintrc. Why this config lead to eslint report Resolve error: unable to load resolver "webpack" ?

{
  // ...
  "settings": {
    "import/resolver": {
      webpack: {
        config: './node_modules/@ali/grunt-default-config/lib/webpack.eslint.config.js'
      }
    }
  }
}
1 Answers

Go though resolve.js and you will find -> tryRequire(eslint-import-resolver-${name})

where the name variable is 'webpack'. so,

npm install -g eslint-import-resolver-webpack

Related