A-Shleifman / eslint-plugin-export-scope

Disallows importing scoped exports outside their scope
https://www.npmjs.com/package/eslint-plugin-export-scope
110 stars 0 forks source link

Exceptions to strict mode? #2

Closed ciriousjoker closed 1 year ago

ciriousjoker commented 1 year ago

We'd like to add exceptions while also using strict mode.

There's one special file in our repo which we use as a mini-testcase. In this file we'd like to import anything from anywhere in order to allow quick prototyping without fiddling with import settings first.

Is something like this planned?

A-Shleifman commented 1 year ago

In Strict Mode files like that are probably exceptions, so how about just disabling the ESLint rule for the file and adding imports manually (without autocomplete)?

/* eslint-disable export-scope/no-imports-outside-export-scope */

import something from 'another/scope';

Or do you think another annotation that would re-enable autocomplete would make it much easier?

ciriousjoker commented 1 year ago

oooh good point, I completely forgot that you can disable them. This perfectly solves it for that single file we would be using that feature on.