Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable ESLint rule monorepo/no-internal-imports #26

Open
boneskull opened this issue Jul 18, 2019 · 1 comment
Open

disable ESLint rule monorepo/no-internal-imports #26

boneskull opened this issue Jul 18, 2019 · 1 comment
Assignees
Labels
chore Related to tests, packaging, build, releases, etc.

Comments

@boneskull
Copy link
Contributor

I had enabled this because it:

  1. restricts imports to a set of whitelisted imports via module-level exports
  2. discourages consumers from reaching into the guts of any given package and doing weird stuff

But it's plainly inconvenient:

import {observable} from '@report-toolkit/common';
const {all, the, stuff, I, need, to, use} = observable;

where it'd be nicer to just:

import {all, the, stuff, I, need, to, use} from '@report-toolkit/common/observable';

Now, each package puts everything in 'src/', so we'd want to actually move the files out of there and into the package root.

This same thing should be possible when using the CJS bundle. I'm not sure the best way to accomplish that, but I think we can look at RxJS as an example, because I believe it allows this. It doesn't bundle itself for CJS, however (it just compiles via TypeScript), which means our Rollup configuration may be limited to generating UMD bundles for browser use. We could then just use @babel/cli to transpile for CJS.

@boneskull boneskull added the chore Related to tests, packaging, build, releases, etc. label Jul 18, 2019
@boneskull boneskull self-assigned this Jul 18, 2019
@boneskull
Copy link
Contributor Author

also the pkg-exports thing could be helpful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Related to tests, packaging, build, releases, etc.
Projects
None yet
Development

No branches or pull requests

1 participant