forked from mysticatea/eslint-plugin-node
-
-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
Description
Environment
Node version: 20
npm version: 10.1.0
ESLint version: 8.51.0
eslint-plugin-n version: 16.2.0
Operating System: macos
What rule do you want to report?
file-extension-in-import
Link to Minimal Reproducible Example
What did you expect to happen?
I was expecting to auto fix this issues with file-extension-in-import
plugin instead of being flagged as error from n/no-missing-import
import { Output } from '@pulumi/pulumi/output'; // this should be fixable as '@pulumi/pulumi/output.js'
import {listWebAppHostKeysOutput} from '@pulumi/azure-native/web/v20220901'; // this should be fixable as '@pulumi/azure-native/web/v20220901/index.js'
migrating to node 20 those imports are failling with:
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/.../node_modules/@pulumi/azure-native/web/v20220901' is not supported resolving ES modules imported from /.../someFile.js
Did you mean to import @pulumi/azure-native/web/v20220901/index.js?
Would be nice to use file-extension-in-import
(maybe with some additional configs) to auto fix those
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response