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

Improve the checks in the "ckeditor5-rules/ckeditor-dll-import" eslint rule #8824

Closed
pomek opened this issue Jan 13, 2021 · 1 comment · Fixed by ckeditor/eslint-plugin-ckeditor5-rules#3
Assignees
Labels
domain:extending-builds type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@pomek
Copy link
Member

pomek commented Jan 13, 2021

In ckeditor/eslint-plugin-ckeditor5-rules#2, we introduced a rule that checks imports between packages. As for now, it does checks:

  • allow local imports (within the same package)
  • allow cross importing DLL packages,
  • allow importing DLL packages by non-DLL packages by using the ckeditor5 package
  • disallow importing DLL packages by non-DLL packages by using directly imports (e.g. import Plugin from '@ckeditor/ckeditor5-core/src/plugin')

We must extend checks:

  • For DLL packages:

    • from 3rd party things
    • directly from within the same package (local ones)
    • via @ckeditor/ckeditor5-* format from other DLL packages
    • NOTE: no imports from non-DLL packages
  • For non-DLL packages

    • directly from within the same package (local ones)
    • from ckeditor5
    • from 3rd party things
@pomek pomek added type:improvement This issue reports a possible enhancement of an existing feature. domain:extending-builds labels Jan 13, 2021
@pomek pomek added this to the iteration 39 milestone Jan 13, 2021
@pomek pomek self-assigned this Jan 13, 2021
@pomek pomek added the squad:dx label Jan 13, 2021
@pomek
Copy link
Member Author

pomek commented Jan 13, 2021

I assume that those rules should be applied to all imports, not only JS files?

Reinmar added a commit to ckeditor/eslint-plugin-ckeditor5-rules that referenced this issue Jan 14, 2021
Fix: Renamed the rule from `ckeditor5-rules/ckeditor-dll-import` to `ckeditor5-rules/ckeditor-imports`. Closes ckeditor/ckeditor5#8824.

Fix: Extended the `ckeditor5-rules/ckeditor-imports` rule. Now the imports listed below are allowed:

- from 3rd party things,
- directly from within the same package,
- via `@ckeditor/ckeditor5-*` format from DLL package,
- via `ckeditor5/src/*` format for non-DLL package.

Imports non-DLL packages are not allowed. Those rules apply to JS, CSS, and SVG files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:extending-builds type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
1 participant