1
0
mirror of https://github.com/thangisme/notes.git synced 2024-09-26 13:55:59 -04:00
notes/node_modules/stylelint/lib/rules/selector-no-type
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00
..
index.js Initial commit 2017-03-09 13:16:08 -05:00
README.md Initial commit 2017-03-09 13:16:08 -05:00

selector-no-type

Disallow type selectors.

    a {}
/** ↑
 * This type of selector */

Options

true

The following patterns are considered warnings:

a {}
a, .foo {}
a > [foo] {}

The following patterns are not considered warnings:

.foo {}
[foo] {}
#foo {}
.bar > #foo {}
#foo.bar {}

Optional secondary options

ignore: ["compounded", "descendant"]

"compounded"

Allow compounded type selectors -- i.e. type selectors chained with other selectors.

The following patterns are not considered warnings:

a.foo {}
a#bar {}

"descendant"

Allow descendant type selectors.

The following patterns are not considered warnings:

.foo a {}
#bar a.foo {}

ignoreTypes: ["/regex/", "string"]

Given:

["/^my-/", "custom"]

The following patterns are not considered warnings:

custom {}
my-type {}
my-other-type {}