Skip to content

eslint-import-resolver-webpack swallows errors in webpack.config.js #536

@leoselig

Description

@leoselig

I was seeing the following error for each of my checked files:
1:0 error Resolve error: Unexpected token import

I was trying to understand why (correct plugin configuration, babel and webpack setup correctly) for about 1h until I realized, that I forgot to start eslint with babel-node and my webpack.config.js was written in babel ES6+ code. Obviosly, it was starting with
import path from 'path';
which seems to have produced said errors.

I think instead eslint-import-resolver-webpack should error when trying to read the webpack configuration, similar to as it does, when settings.import/resolver.webpack cannot be resolved.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions