Skip to content

Commit

Permalink
fix: use webpack resolver and turn off node/no-missing-imports
Browse files Browse the repository at this point in the history
eslint-plugin-import will use webpack resolver and check for missing imports.
The node variant is causing false error reports as it does not use resolvers.

See mysticatea/eslint-plugin-node#249 (comment) for details.
  • Loading branch information
max-nextcloud committed Apr 6, 2022
1 parent 9e808fd commit c514f01
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ module.exports = {
],
settings: {
'import/resolver': {
webpack: {
config: 'webpack.js'
},
node: {
paths: ['src'],
extensions: ['.js', '.vue'],
},
webpack: { config: './webpack.js' },
},
},
rules: {
/* Turn off node checks for import resolution.
* Let eslint-plugin-import handle this.
* It knows how to use resolvers.
*
* See https://github.com/mysticatea/eslint-plugin-node/issues/249#issuecomment-747980937
*/
'node/no-missing-import': 'off',
},
}

0 comments on commit c514f01

Please sign in to comment.