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

Chore/8201 deprecate json tokens #8246

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

weronikaolejniczak
Copy link
Contributor

@weronikaolejniczak weronikaolejniczak commented Dec 17, 2024

Summary

I added a new rule to our ESLint plugin, no-restricted-eui-imports, that won't conflict with the inbuilt no-restricted-imports rule and will allow us to define several error levels at once. I.e. we want some imports to be marked as warning and not an error, as it's done in Kibana.

Screenshot 2025-01-07 at 11 48 02 Screenshot 2025-01-07 at 11 50 41

Context:

The JSON token imports in @kbn/eslint/module_migration need to be removed as well:

https://github.com/elastic/kibana/blob/212b1926743ca5821992c2877d9c68f621e1875e/packages/kbn-eslint-config/.eslintrc.js#L131-L140

QA

  1. Pack the ESLint plugin: yarn workspace @elastic/eslint-plugin-eui pack
  2. Go to Kibana and point the EUI ESLint plugin to the tarball: "@elastic/eslint-plugin-eui": "file:path/to/the/package.tgz"
  3. Install dependencies in Kibana: yarn and bootstrap: yarn kbn bootstrap --no-validate
Screenshot 2025-01-07 at 11 52 56 Screenshot 2025-01-07 at 11 53 14

Unit tests: yarn workspace @elastic/eslint-plugin-eui test

@weronikaolejniczak weronikaolejniczak force-pushed the chore/8201-deprecate-json-tokens branch from 04461a6 to 5cd5dd5 Compare December 29, 2024 18:44
@weronikaolejniczak weronikaolejniczak force-pushed the chore/8201-deprecate-json-tokens branch from 5cd5dd5 to 6a751f9 Compare January 7, 2025 10:05
@weronikaolejniczak weronikaolejniczak marked this pull request as ready for review January 7, 2025 10:52
@weronikaolejniczak weronikaolejniczak requested a review from a team as a code owner January 7, 2025 10:52
@weronikaolejniczak weronikaolejniczak force-pushed the chore/8201-deprecate-json-tokens branch from 6a751f9 to b8d7a96 Compare January 8, 2025 10:56
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants