3.0.1 • Published 5 months ago

@mrhenry/stylelint-mrhenry-invalid-of-type-selectors v3.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@mrhenry/stylelint-mrhenry-invalid-of-type-selectors

version

Disallow ambiguous *-of-type selectors.

/* valid, the selector is a type selector */
strong:first-of-type {}

/* invalid, the selector isn't a type selector */
.foo:first-of-type {}

Warns when :first-of-type and similar selectors are used in selectors that do not match at least one type. This rule is not fully accurate and will have false negatives (foo .bar:first-of-type), but it is accurate enough to create awareness around the general issue.

Usage

npm install --save-dev @mrhenry/stylelint-mrhenry-invalid-of-type-selectors

// stylelint.config.js
module.exports = {
	plugins: [
		"@mrhenry/stylelint-mrhenry-invalid-of-type-selectors",
	],
	rules: {
		"@mrhenry/stylelint-mrhenry-invalid-of-type-selectors": true,
	},
}
3.0.1

5 months ago

3.0.0

5 months ago

2.0.2

10 months ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago