Closed tpluscode closed 1 year ago
Ping @jordansexton ?
@tpluscode Ah, thanks for the ping, didn't see this. Will review today.
Super, thanks
Aha, I wrote that lengthy reply before realising I misunderstood your point. 😅
Yes, you're right, a file which does no exist should have the .js
suffix added which will inevitably lead to a different rule kicking in, or TS compiler error, ot runtime loader error. Not this plugin's concern
There are quite some cases, some of which are not handled by this PR not the base branch. It would really be good to add unit tests but I do not have experience testing eslint rules. Do you?
What do you think about my updated code @jordansexton ?
Published in v0.1.2! Please let me know if it works well for you, and thank you for working on this!
Super, thanks for releasing
This is an attempt to fix #1
I would like to add some tests but this is my first time writing code for an eslint plugins and not sure how to proceed
About the change itself, it find the actual module in the filesystem and applies to rule only when a module exists with one of the extensions
For example, given code like
An error will be shown when there is a source file
bar.json.js
orbar.json.ts
but not when it's simplybar.json
I'm not sure if it's correct to also include
jsx
andtsx
in the extensions to check.