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
When using the resolvePaths setting to set the paths where eslint should look when resolving module specifiers, import statements resolve as expected, but require statements don't.
The way eslint-plugin-n handles import statements is that it pretends that the source module is in each of the directories specified by resolvePaths, however it does not do this for require statements.
Note that the paths property of the options parameter of resolve.sync should work like the paths property of the options parameter of require.resolve, but it doesn't.
The text was updated successfully, but these errors were encountered:
When using the
resolvePaths
setting to set the paths where eslint should look when resolving module specifiers,import
statements resolve as expected, butrequire
statements don't.See my minimal reproducible example.
The way eslint-plugin-n handles
import
statements is that it pretends that the source module is in each of the directories specified byresolvePaths
, however it does not do this forrequire
statements.Note that the
paths
property of theoptions
parameter ofresolve.sync
should work like thepaths
property of theoptions
parameter ofrequire.resolve
, but it doesn't.The text was updated successfully, but these errors were encountered: