Skip to content
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

Infrastructure: Update Stylelint #2077

Merged
merged 1 commit into from
Nov 10, 2021
Merged

Conversation

nschonni
Copy link
Contributor

Autofix and address most new rules.
Ignore the kebab case rules

@@ -17,6 +17,8 @@
]
},
],
"selector-class-pattern": null,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the suppress issues

examples/css/github.css
 77:1  ✖  Expected class selector to be kebab-case  selector-class-pattern

examples/dialog-modal/css/dialog.css
  30:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  34:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  38:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  38:14  ✖  Expected class selector to be kebab-case  selector-class-pattern
  48:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  48:14  ✖  Expected class selector to be kebab-case  selector-class-pattern
  57:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  62:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  62:19  ✖  Expected class selector to be kebab-case  selector-class-pattern
  68:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  68:19  ✖  Expected class selector to be kebab-case  selector-class-pattern
  74:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  74:19  ✖  Expected class selector to be kebab-case  selector-class-pattern
  80:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  80:19  ✖  Expected class selector to be kebab-case  selector-class-pattern
  86:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  91:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
  99:1   ✖  Expected class selector to be kebab-case  selector-class-pattern
 103:1   ✖  Expected class selector to be kebab-case  selector-class-pattern

examples/grid/css/layoutGrids.css
  20:3  ✖  Expected class selector to be kebab-case  selector-class-pattern
  25:1  ✖  Expected class selector to be kebab-case  selector-class-pattern
 105:1  ✖  Expected class selector to be kebab-case  selector-class-pattern
 127:1  ✖  Expected id selector to be kebab-case     selector-id-pattern
 172:1  ✖  Expected class selector to be kebab-case  selector-class-pattern
 178:1  ✖  Expected class selector to be kebab-case  selector-class-pattern
 182:1  ✖  Expected class selector to be kebab-case  selector-class-pattern

examples/listbox/css/listbox.css
 19:17  ✖  Expected id selector to be kebab-case  selector-id-pattern

examples/slider/css/slider-color-viewer.css
 51:15  ✖  Expected class selector to be kebab-case  selector-class-pattern

@nschonni
Copy link
Contributor Author

@mcking65 the diff is a little ugly, so summarizing the changes a bit:

  • Auto-rewrite the degrees
  • auto-rewrite color values
  • manual rewrite of shorthand values that were flagged
  • cleaned up vendor prefixed values that were rewritten and became duplicate values
  • suppressed new warnings on kebab case CSS classes since that is more a functional change to example markup

@nschonni nschonni force-pushed the update-stylelint branch 2 times, most recently from 4b7aeb2 to c44ef2c Compare November 2, 2021 05:22
@@ -1,7 +1,7 @@
.accordion {
margin: 0;
padding: 0;
border: 2px solid hsl(0, 0%, 52%);
border: 2px solid hsl(0deg 0% 52%);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change https://github.com/w3c/aria-practices/wiki/Code-Guide#syntax-1 to say to use spaces instead of commas in rgb(), hsl() et. al.?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be autofixed to either "modern" (spaces) or "legacy" (commas)
https://stylelint.io/user-guide/rules/list/color-function-notation

Support seems pretty good, so I think we can go with "modern".
https://caniuse.com/mdn-css_types_color_rgb_function_accepts_alpha

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I autofixed the bulk of this using whatever the default is by the preset

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge this. Updating the wiki is tracked in #2110

@zcorpan zcorpan added the Infrastructure Related to maintaining task force and repo operations, processes, systems, documentation label Nov 2, 2021
Autofix and address most new rules.
Ignore the kebab case rules
@zcorpan
Copy link
Member

zcorpan commented Nov 10, 2021

@howard-e can you merge?

@howard-e howard-e merged commit edddf9f into w3c:main Nov 10, 2021
@nschonni nschonni deleted the update-stylelint branch November 10, 2021 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Related to maintaining task force and repo operations, processes, systems, documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants