You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In https://github.com/benmosher/eslint-plugin-import/blob/master/resolvers/webpack/index.js#L174 it might be safer if the second null argument corresponding to the 'context' argument is an empty string instead. Webpack will always provide a string for this argument and no document says it will do otherwise. Under that circumstance, it is normal to use string methods such as indexOf which will make it fail when a null is received. An empty string, I believe, serves the same purpose and doesn't break anything.
The text was updated successfully, but these errors were encountered:
It is the absolute pathname to the folder containing the file with the require call. For relative paths, it would allow you to use path.resolve to get the absolute path to the required file, or a path that can be further processed by require.resolve to add the usual defaults (index.js and such).
If you add the following to any webpack.config.js file you might have, you will see what it takes without disturbing the build process:
(a suggestion I'm not sure about:)
In https://github.com/benmosher/eslint-plugin-import/blob/master/resolvers/webpack/index.js#L174 it might be safer if the second
null
argument corresponding to the 'context' argument is an empty string instead. Webpack will always provide a string for this argument and no document says it will do otherwise. Under that circumstance, it is normal to use string methods such asindexOf
which will make it fail when anull
is received. An empty string, I believe, serves the same purpose and doesn't break anything.The text was updated successfully, but these errors were encountered: