-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Plugin candidates for 8.0.0 #2079
Comments
@jeddy3
Not agree:
CSS does not stand still, and I see in the future that we have to consider a lot of things that come from
@jeddy3 i think we it would be much better than do in |
@stylelint/core I would like to add to the above written, that most used |
@jeddy3 Opening separate issues sounds fine to me. |
I have concerns on removing a couple of these, but yes, lets discuss each them on separate issue👍 |
This has been broken into separate issues. |
There are over 170 rules in stylelint.
There are the 48
*-before
,*-after
and*-inside
variants of the*-space-*
,*-newline-*
and*-unspaced-*
rules.There are the 11
*-empty-line-before
and*-max-empty-line
rules.And there is the
indentation
rule. I think these rules work together to allow the enforcement of most whitespace code styles. More so than any CSS linter has done before.Then there are:
*-case
rules.*-quotes
rules.number-*
andlength-*
rules.*-notation
rules.*-length
rules.*-no-redundant-*
rules:declaration-block-no-redundant-longhand-properties
shorthand-property-no-redundant-values
no-eol-whitespace
no-missing-end-of-source-newline
I think these 26 rules cover off most other code style requirements.
Next, there are 49 rules for (dis)allowing language constructs:
*-whitelist
and*-blacklist
rules.*-no-*
rules:selector-no-*
rules.*-no-important
rules.color-no-*
rules.*-no-vendor-prefix
rules.*-no-empty
rules discussed in Rule ideaselector-pseudo-class-no-empty-parentheses
#2047 (comment).*-pattern
rules.I think the breadth of these rules is excellent and covers nearly all of the language constructs available in CSS.
There are these 4 additional limiting rules:
declaration-block-single-line-max-declarations
max-nesting-depth
selector-max-compound-selectors
selector-max-specificity
And these 5 rules that check valid but likely unintentional code:
*-duplicate-*
rules:declaration-block-no-duplicate-properties
font-family-no-duplicate-names
no-duplicate-selectors
declaration-block-no-shorthand-property-overrides
no-descending-specificity
I'm confident all the rules listed above adhere to the criteria (and therefore facilitate a sustainable core). Although, please do shout if you spot anything contentious in there!
Having identified the rules that match our criteria first, I was left with the following rules:
block-no-single-line
color-no-invalid-hex
no-browser-hacks
no-extra-semicolons
no-indistinguishable-colors
no-invalid-double-slash-comments
no-unknown-animations
no-unsupported-browser-features
root-no-standard-properties
selector-root-no-composition
string-no-newline
stylelint-disable-reason
time-no-imperceptible
And the 7 other
*-no-unknown
rules.I intend to break each into a separate issue so we can discuss its adherence to the criteria and whether it is better as a plugin. I hope to document where each rule does not meet the criteria, so that the process of discussing each rule is as least time consuming as possible for everyone else. As an example, the first rule,
block-no-single-line
, was made redundant by theblock-*-brace-newline-*
rules. Does this sound like a plan?As I said in #2068 (comment), I think we have a much better understanding of plugins and rules now than we did six months ago and that
8.0.0
presents a great opportunity for us to build on that understanding to ensure stylelint excels in its approaching third year :)The text was updated successfully, but these errors were encountered: