-
Notifications
You must be signed in to change notification settings - Fork 861
feat(eslint-plugin): remove prefer-css-prop-for-static-styles rule #8760
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
feat(eslint-plugin): remove prefer-css-prop-for-static-styles rule #8760
Conversation
|
This PR contains breaking changes. The opener of this pull request is asked to perform the following due diligence steps below, to assist EUI in our next Kibana upgrade:
|
💚 Build SucceededHistory
|
💚 Build Succeeded
|
acstll
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran test and build locally. Everything seems to be correct. Thanks for tackling this one (again!).
| @@ -0,0 +1,3 @@ | |||
| **Breaking changes** | |||
|
|
|||
| - Remove `prefer-css-prop-for-static-styles` rule because it produces too many warnings. Static code analysis cannot flag dynamic styles with confidence because it doesn't run the code to asses runtime values. We will explore runtime solutions. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[no action required] I first thought this was too long, but after reading it several times I think it's good to have all this information here (you can understand right away the reason why the rule is being removed, and if you need more context, there will be the link to the PR, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, following what @JasonStoltz proposed to make the breaking changes more clear.
`@elastic/eslint-plugin-eui`: `1.0.0` ⏩ `2.0.0` [Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams) ## Changes This PR updates the `@elastic/eslint-plugin-eui` version to latest: [v2.0.0](https://www.npmjs.com/package/@elastic/eslint-plugin-eui/v/2.0.0). ## Package updates ### `@elastic/eslint-plugin-eui` **Breaking changes** - Remove `prefer-css-prop-for-static-styles` rule because it produces too many warnings. Static code analysis cannot flag dynamic styles with confidence because it doesn't run the code to asses runtime values. We will explore runtime solutions. ([#8760](elastic/eui#8760))
`@elastic/eslint-plugin-eui`: `1.0.0` ⏩ `2.0.0` [Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams) ## Changes This PR updates the `@elastic/eslint-plugin-eui` version to latest: [v2.0.0](https://www.npmjs.com/package/@elastic/eslint-plugin-eui/v/2.0.0). ## Package updates ### `@elastic/eslint-plugin-eui` **Breaking changes** - Remove `prefer-css-prop-for-static-styles` rule because it produces too many warnings. Static code analysis cannot flag dynamic styles with confidence because it doesn't run the code to asses runtime values. We will explore runtime solutions. ([elastic#8760](elastic/eui#8760))
Summary
Important
This is a breaking change.
Closes #8708
Removes
prefer-css-prop-for-static-stylesrule. Read comments on the issue to understand the context.tl;dr; Using a static code analysis tool like ESLint is unfit for the job. The rule as of now produces too many warnings. We want to explore runtime solutions that can flag dynamic styles.
Kibana impact
There is only 1 mention:
x-pack/solutions/security/plugins/security_solution/public/asset_inventory/components/asset_inventory_bar_chart.tsxUpdate commit
Cloud UI impact
No disable comments / rule overrides (search)