Disallow usage the d-none CSS class (github/no-d-none)

February 8, 2023 ยท View on GitHub

๐Ÿ’ผ This rule is enabled in the ๐Ÿ” internal config.

Rule Details

Ideally JavaScript behaviors should not rely on Primer CSS when the hidden property can be used.

๐Ÿ‘Ž Examples of incorrect code for this rule:

div.classList.add('d-none')

๐Ÿ‘ Examples of correct code for this rule:

div.hidden = false

Version

4.3.2