Skip to content

Conversation

@weronikaolejniczak
Copy link
Contributor

@weronikaolejniczak weronikaolejniczak commented Feb 6, 2025

Summary

Bring in the changes from elastic/eui#8304, specifically ESLint rules:

  • no-restricted-eui-imports
  • no-css-color (migrated from @kbn/eslint-plugin-css)
  • prefer-css-attribute-for-eui-components (migrated from @kbn/eslint-plugin-css)

Relates to elastic/eui#8201, https://github.com/elastic/eui-private/issues/275

QA

Instructions

  1. Checkout this branch: gh pr checkout 210082.
  2. Reinstall dependencies: yarn kbn bootstrap.
  3. See output of ESLint. There should be no errors.
  4. Test below cases.

Test cases

no-restricted-eui-imports

Example files:

  • JSON imports: src/platform/packages/shared/kbn-ui-theme/src/theme.ts
  • @kbn/ui-theme: src/platform/plugins/private/vis_types/vega/public/data_model/utils.ts

no-css-color

Example file: src/platform/plugins/shared/kibana_react/public/page_template/no_data_page/no_data_card/elastic_agent_card.tsx:50

Screenshot 2025-02-26 at 15 01 53

prefer-css-attribute-for-eui-components

Example file: x-pack/examples/alerting_example/public/alert_types/always_firing.tsx:166

@weronikaolejniczak weronikaolejniczak linked an issue Feb 25, 2025 that may be closed by this pull request
@weronikaolejniczak weronikaolejniczak changed the title chore: eslint plugin chore(eslint): update @elastic/eui ESLint plugin Feb 26, 2025
@weronikaolejniczak weronikaolejniczak force-pushed the chore/eui-eslint-plugin branch 2 times, most recently from 62fc504 to b0e895a Compare February 27, 2025 15:19
@weronikaolejniczak weronikaolejniczak force-pushed the chore/eui-eslint-plugin branch 2 times, most recently from d06195f to 25e504b Compare March 5, 2025 14:24
@weronikaolejniczak weronikaolejniczak added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Mar 31, 2025
@weronikaolejniczak weronikaolejniczak marked this pull request as ready for review March 31, 2025 18:47
@weronikaolejniczak weronikaolejniczak requested review from a team as code owners March 31, 2025 18:47
@weronikaolejniczak
Copy link
Contributor Author

weronikaolejniczak commented Mar 31, 2025

I have a PR open (elastic/eui#8524) with the fix for:

TypeError: Cannot read properties of undefined (reading 'init')

I will release a patch version and update this PR.

EDIT: Done on 347a4e5

@weronikaolejniczak weronikaolejniczak changed the title chore(eslint): update @elastic/eui ESLint plugin chore: update eslint-plugin-eui to 0.1.1 Mar 31, 2025
@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 31, 2025

💔 Build Failed

Failed CI Steps

History

@weronikaolejniczak weronikaolejniczak requested a review from a team as a code owner March 31, 2025 21:48
Copy link
Contributor

@eokoneyo eokoneyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally,

configured rules work;

  • eslint rule, no restricted eui imports works
    Screenshot 2025-04-02 at 08 45 15

  • eslint rule no css color works;
    Screenshot 2025-04-02 at 08 40 58

  • eslint rule prefer css prop works;
    Screenshot 2025-04-02 at 08 44 44

@weronikaolejniczak
Copy link
Contributor Author

@elastic/security-generative-ai could you take a look? I only changed the eslint-disable comments in your source 😄

@patrykkopycinski
Copy link
Contributor

🚢 @weronikaolejniczak :)

@weronikaolejniczak weronikaolejniczak merged commit 7e46d2e into elastic:main Apr 2, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate euiThemeVars

6 participants