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

Stylelint 16.13: Cannot read properties of undefined (reading 'toLowerCase') #68

Closed
carlosjeurissen opened this issue Jan 13, 2025 · 4 comments

Comments

@carlosjeurissen
Copy link

carlosjeurissen commented Jan 13, 2025

When using stylelint-a11y with Stylelint 16.13, the following error shows up:

__tests__/index.test.js > flags warnings with invalid css > correct rule flagged
TypeError: Cannot read properties of undefined (reading 'toLowerCase')
 ❯ <input css T8jugF>:1:1
 ❯ isStandardSyntaxAtRule node_modules/.pnpm/stylelint@16.13.1_typescript@5.6.3/node_modules/stylelint/lib/utils/isStandardSyntaxAtRule.mjs:9:18
 ❯ node_modules/.pnpm/@double-great+stylelint-a11y@3.0.2_stylelint@16.13.1_typescript@5.6.3_/node_modules/@double-great/stylelint-a11y/src/rules/no-spread-text/index.js:45:12
 ❯ node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/container.js:377:18
 ❯ node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/container.js:305:18
 ❯ Root.each node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/container.js:53:16
 ❯ Root.walk node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/container.js:302:17
 ❯ Root.walkRules node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/container.js:375:19
 ❯ node_modules/.pnpm/@double-great+stylelint-a11y@3.0.2_stylelint@16.13.1_typescript@5.6.3_/node_modules/@double-great/stylelint-a11y/src/rules/no-spread-text/index.js:42:10
 ❯ runRule node_modules/.pnpm/stylelint@16.13.1_typescript@5.6.3/node_modules/stylelint/lib/lintPostcssResult.mjs:120:11
@lee-chase
Copy link

Just hit this going through my regular updates. It became an issue in Stylelint 16.13.0 (16.12.0 still works).

@jsnmrs
Copy link

jsnmrs commented Jan 17, 2025

Confirming that with #69 and version 3.0.3, I'm no longer encountering TypeError: Cannot read properties of undefined (reading 'toLowerCase') in Stylelint 16.13.10.

Appreciate the fix @sushichan044

@jsnmrs jsnmrs closed this as completed Jan 17, 2025
@lee-chase
Copy link

Thanks @jsnmrs @sushichan044 can confirm I am able to update to stylelint 16.13.2 without error using 3.0.3.

@carlosjeurissen
Copy link
Author

Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants