WordPress/gutenberg

Add ESLint rule to prevent usage of the order CSS property

已關閉

#61,247 建立於 2024年4月30日

 (12 則留言) (0 個反應) (1 位負責人)JavaScript (3,893 個分叉)batch import
Good First Issue[Focus] Accessibility (a11y)[Status] In Progress[Type] Code Quality

倉庫指標

星標
 (9,607 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Description

See https://github.com/WordPress/gutenberg/issues/61241

Some components come with CSS in JS.

https://github.com/WordPress/gutenberg/issues/61241 and https://github.com/WordPress/gutenberg/pull/61243 aim to introduce a stylelint rule to prevent usage of the order CSS property, which is impactful for accessibility.

In the same way, it would be nice to add an ESLint rule to prevent usage of the order CSS property in any *.js file.

Unfortunately this isn't exactly my area of expertise so that I'd appreciate some guidance. I did see a similar rule added in https://github.com/WordPress/gutenberg/pull/58130

Step-by-step reproduction instructions

  • Add an order CSS property e.g. order: 1; to any CSS-in-JS for example in this file..
  • Run npm run lint:js.
  • Observe the linter does not report any error.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

貢獻者指南