eslint-plugin-import icon indicating copy to clipboard operation
eslint-plugin-import copied to clipboard

`import/no-import-module-exports`'s `exception` option root path ?

Open DrakaSAN opened this issue 1 year ago • 1 comments

I have a project with multiple points of entries (index.ts and lambda.ts, both on project's root), and am getting errors from the 'import/no-import-module-exports' rule

As described in the documentation, I tried to add:

'import/no-import-module-exports': ['error', { exceptions: ['lambda.ts']}],

to exclude that file and only that file from the rule.

The exception is however ignored, as it looks like I need to add **/* to catch the file in the glob.

I guess this is due to the glob starting from another place than the project's root, but it doesn't looks like it is documented ?

DrakaSAN avatar Dec 27 '23 18:12 DrakaSAN

Is this on the command line, or in an IDE?

Either way, the command needs to be run from the project root (like all commands in all projects), which also means that your editor needs to be opened from the project root.

ljharb avatar Dec 27 '23 18:12 ljharb

Sorry for the late response, I didn't got the notification in time

This is in an IDE (VSCode with dbaeumer.vscode-eslint plugin), so this may actually be a problem on that front instead of your plugin itself

DrakaSAN avatar Mar 18 '24 18:03 DrakaSAN

Can you verify if it happens on the command line? If so, then we can fix it.

ljharb avatar Mar 18 '24 18:03 ljharb

Cannot reproduce from command-line, so it looks like if there is an issue, it is on the plugin side

DrakaSAN avatar Mar 19 '24 14:03 DrakaSAN