openfresh / stylelint-config-fresh

Stylelint sharable config for FRESH!
3 stars 0 forks source link

stylelint-a11y #6

Open 1000ch opened 6 years ago

1000ch commented 6 years ago

How about https://github.com/YozhikM/stylelint-a11y?

masuP9 commented 6 years ago

thank you for the information!

media-prefers-reduced-motion rule is cool. And perfectly agree to no-outline-none rule.

Looks good to the new project, but a little strict to use recommended rule for the current project. If use this plugin to current project, customize rule as below

{
  "plugins": ["stylelint-a11y"],
  "rules": {
    "a11y/media-prefers-reduced-motion": true,
    "a11y/no-outline-none": true,
    "a11y/selector-pseudo-class-focus": false,
    "a11y/font-size-is-readable": false,
    "a11y/line-height-is-vertical-rhythmed": false,
    "a11y/no-display-none": false,
    "a11y/no-obsolete-attribute": false,
    "a11y/no-obsolete-element": false,
    "a11y/no-text-align-justify": [true, { "severity": "error" }]
  }
}

selector-pseudo-class-focus : there are many cases that :hover and :focus is not same style.

font-size-is-readable too strict in this project

line-height-is-vertical-rhythmed : this project don't have vertical rhythme. and sometimes use line-height:1 to Button UI

no-display-none too strict

no-obsolete-attribute and no-obsolete-element : It's better check at eslint plugin than stylelint

1000ch commented 6 years ago

I think it's the best @masuP9 to choose rules for stylelint-config-fresh (entirely I agree). If you think rules which you choose are OK, I'll create a PR. Or you want to consider or discuss more, let's comment.

When we create own rules, we should configure with considering this plugin's Recommended Config.

1000ch commented 6 years ago

I'll create a PR.

Of course you can create (no other intentions).