import-js / eslint-plugin-import

ESLint plugin with rules that help validate proper imports.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

DrakaSAN opened this issue · 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 ?

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.