ryersondmp / sa11y

Sa11y is an accessibility quality assurance tool that visually highlights common accessibility and usability issues. Geared towards content authors, Sa11y straightforwardly identifies errors or warnings at the source with a simple tooltip on how to fix them.
https://sa11y.netlify.app
Other
280 stars 43 forks source link

scss lint #53

Closed brianteeman closed 1 year ago

brianteeman commented 1 year ago

If you run the lint with the defined rules you get a LOT of errors. Most of this is because the lint hasn't been recently. But there are also two rules that are causing problems.

"value-no-vendor-prefix": true

This rule comes from Joomla but we also have as part of our build scripts something that checks to see if a vendor prefix is needed and adds it if needed.

        "property-disallowed-list": [
            "/left/",
            "/right/"
        ],

I know why you made this rule but its creating a lot of false positives where you have some absolute positions eg

src/scss/tooltips.scss
  59:3  ✖  Unexpected property "left"                 property-disallowed-list
  71:3  ✖  Unexpected property "left"                 property-disallowed-list
  78:3  ✖  Unexpected property "right"                property-disallowed-list
  82:3  ✖  Unexpected property "right"                property-disallowed-list
  84:3  ✖  Unexpected property "border-left-color"    property-disallowed-list
  89:3  ✖  Unexpected property "left"                 property-disallowed-list
  93:3  ✖  Unexpected property "left"                 property-disallowed-list
  95:3  ✖  Unexpected property "border-right-color"   property-disallowed-list
 260:5  ✖  Unexpected property "border-left-color"    property-disallowed-list
 264:5  ✖  Unexpected property "border-right-color"   property-disallowed-list

I could disable those two rules and then run npx stylelint --config .stylelintrc.json -s scss "src/scss/**/*.scss" --fix and submit a pr but not sure if that would mess with your own build process

adamchaboryk commented 1 year ago

Thanks for pointing this out, Brian — I can take a look at this. I'd like to be as close as possible to your dev tooling. I'll give it a try, and loop you in

adamchaboryk commented 1 year ago

I had a look...

So turns out my Stylelint extension was disabled, which explains why I wasn't seeing issues with my SCSS 🤦‍♂️

I also configured autoprefixer - another thing I forgot to setup, lol.

I think it's ok now. Do you mind taking a look?

https://github.com/ryersondmp/sa11y/tree/3.0.3-development

brianteeman commented 1 year ago

Looks ok now. Do you want to update the copyright date in sa11y.scss? before commiting can you also fix the spelling of utilities line 93 in rollup.config.js

adamchaboryk commented 1 year ago

Good catch

I've removed the copyright notices from /src/, and instead automated the copyright notices using rollup output. Also automated the version number on all pages within the /docs/

brianteeman commented 1 year ago

good stuff

adamchaboryk commented 1 year ago

Are you still looking over things? I think you mentioned potential RTL issues a while back — either way, i'll hold off on releasing for now

brianteeman commented 1 year ago

Now that you have fixed all that stuff I can check it properly ;) Will do it on Sunday

adamchaboryk commented 1 year ago

No rush!! I greatly appreciate you having a look!

Cheers