eslint-plugin-import
eslint-plugin-import copied to clipboard
Add support for require.resolve
Closes #585
Related to discussion in #1035 (link to comment).
So far I've only added require.resolve
for commonjs
with no-unresolved
, let me know if I should add it anywhere else.
Coverage increased (+0.09%) to 97.349% when pulling 497ead05001478e1c6d26ff1b3cec5dfeb42d832 on vikr01:feature/require-resolve into b4a2f11fcacc6b2f048da4b29cfc896e682f17d1 on benmosher:master.
@ljharb was thinking the same thing, yeah I'll make a version using an option
Closing in favor of #1217
I'm going to keep the two in sync; orphaned PRs clutter the log.
@ljharb why is this a breaking change if require.resolve
is part of CommonJS?
feels semver minor to me, in that it is sortof a bugfix, but broad enough that it qualifies as an added feature.
I'd prefer this over require-ing (pun intended) users to discover and enable this behavior.
@benmosher There may be some who are using require.resolve
on files generated at build time (instead of path.join
/path.resolve
).
fair enough, I guess can just try to make the note to bump it to on-by-default in v3.
@benmosher new warnings are almost always a breaking change.