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

[7.x] [New platform] Restrict import from core&plugin internals for js files (#33697) #34139

Merged
merged 1 commit into from
Mar 29, 2019

Conversation

mshustov
Copy link
Contributor

Backports the following commits to 7.x:

elastic#33697)

* restrict import from core&plugin internals

* Fork import/no-restricted-paths and add allowSameFolder option

Our use case requires to restrict imports from plugin folders, which names are unknown for us yet. We cannot use 'import/no-restricted-paths' in the current state, because if we define 'from: plugins/*/server/' the rule will report all relative imports in the same folder as well. To fix this problem we added another option 'allowSameFolder' that makes the rule to ignore imports in the same folder.

* update notices

* add basePath option

* support glob pattern instead of reagexp

* remove @notice, make basePath required
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mshustov mshustov merged commit 6faa1da into elastic:7.x Mar 29, 2019
@mshustov mshustov deleted the backport/7.x/pr-33697 branch March 29, 2019 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants