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 no-restricted-path rule from kbn-eslint-plugin-eslint to handle absolute paths. #36096

Closed
mshustov opened this issue May 6, 2019 · 5 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@mshustov
Copy link
Contributor

mshustov commented May 6, 2019

plugin doesn't show an error for such cases:

// in x-pack/....ts 
import { HttpServerInfo } from 'src/core/server/http';

here import works due to tsconfig resolution mechanism setup with baseUrl: "."

@mshustov mshustov added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform labels May 6, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@LeeDr LeeDr added the bug Fixes for quality problems that affect the customer experience label Oct 3, 2019
@LeeDr
Copy link

LeeDr commented Oct 3, 2019

This is actually broken on Windows OS right now. Seems to have something to do with \ /
@spalger looked at it a bit.

$ git commit -m "fix clearValueWithKeyboard to still work on Firefox"
ERROR
      C:\Users\LeeDr\git\kibana\src\core\server\legacy\legacy_service.test.ts
        47:42  error  Unexpected path "src/core/server/saved_objects/saved_objects_service" imported in restricted zone  @kbn/eslint/no-restricted-paths

      C:\Users\LeeDr\git\kibana\src\core\server\saved_objects\migrations\core\migration_context.ts
        27:24  error  Unexpected path "src/core/server/logging" imported in restricted zone  @kbn/eslint/no-restricted-paths

      C:\Users\LeeDr\git\kibana\src\core\server\saved_objects\migrations\core\migration_logger.ts
        20:24  error  Unexpected path "src/core/server/logging" imported in restricted zone  @kbn/eslint/no-restricted-paths

      C:\Users\LeeDr\git\kibana\src\core\server\saved_objects\migrations\kibana\kibana_migrator.ts
        25:24  error  Unexpected path "src/core/server/logging" imported in restricted zone        @kbn/eslint/no-restricted-paths
        26:34  error  Unexpected path "src/core/server/kibana_config" imported in restricted zone  @kbn/eslint/no-restricted-paths

      ✖ 5 problems (5 errors, 0 warnings)

ERROR [eslint] errors

@mshustov
Copy link
Contributor Author

mshustov commented Oct 7, 2019

@LeeDr I sent a fix #47435 fro your case. could you check if it works for you?

@joshdover
Copy link
Contributor

Was this solved by #63741 (sort of a workaround, but I believe it solves the immediate need?)

@joshdover joshdover self-assigned this May 7, 2020
@joshdover
Copy link
Contributor

Verified that this is not longer an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

4 participants