Path: blob/main/resolvers/webpack/README.md
829 views
eslint-import-resolver-webpack
Webpack-literate module resolution plugin for eslint-plugin-import.
💥 Only "synchronous" Webpack configs are supported at the moment. If your config returns a
Promise, this will cause problems. Consider splitting your asynchronous configuration to a separate config.
Published separately to allow pegging to a specific version in case of breaking changes.
To use with eslint-plugin-import, run:
or if you manage ESLint as a dev dependency:
Will look for webpack.config.js as a sibling of the first ancestral package.json, or a config parameter may be provided with another filename/path either relative to the package.json, or a complete, absolute path.
If multiple webpack configurations are found the first configuration containing a resolve section will be used. Optionally, the config-index (zero-based) setting can be used to select a specific configuration.
or with explicit config file name:
or with explicit config file index:
or with explicit config file path relative to your projects's working directory:
or with explicit config object:
If your config relies on environment variables, they can be specified using the env parameter. If your config is a function, it will be invoked with the value assigned to env:
Support
Get supported eslint-import-resolver-webpack with the Tidelift Subscription