You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With new submodules pattern implemented recently here, we are not allowing any module to import other modules. Modules can only import what is in src folder. Contributors adding code to modules may not know of this requirement and reviewers too may miss while approving pull requests. I think eslint can rescue us here.
Extend ES lint to throw error when modules are importing other modules. Also another good to have feature with this would be to make sure modules use relative path while importing.
Sample code which should throw error
// Consider two files
// File 1 modules/currency.js
// File 2 modules/sampleBidAdapter.js
// sampleBidAdapter.js
...
import * from './currency'; // This should not be allowed.
...
...
// Consider two files
// File 2 modules/sampleBidAdapter.js
// sampleBidAdapter.js
...
import * from 'src/utils'; // This should not be allowed.
import * from '../src/utils'; // Correct way to import module
...
...
The text was updated successfully, but these errors were encountered:
Type of issue
Feature Request
Description
With new submodules pattern implemented recently here, we are not allowing any module to import other modules. Modules can only import what is in src folder. Contributors adding code to modules may not know of this requirement and reviewers too may miss while approving pull requests. I think eslint can rescue us here.
Extend ES lint to throw error when modules are importing other modules. Also another good to have feature with this would be to make sure modules use relative path while importing.
Sample code which should throw error
The text was updated successfully, but these errors were encountered: