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

Parsing nested SASS causes errors when linting #12

Open
corroded opened this issue Jun 5, 2019 · 0 comments
Open

Parsing nested SASS causes errors when linting #12

corroded opened this issue Jun 5, 2019 · 0 comments

Comments

@corroded
Copy link

corroded commented Jun 5, 2019

I might be in the minority here of using SASS over SCSS but the linter just dies when parsing certain nested keywords:

stylelint css/base/_typography.sass
Error: Expected pseudo-class or pseudo-element
    at new error (/Users/my_project/assets/node_modules/stylelint-rscss/node_modules/postcss-selector-parser/dist/processor.js:29:23)
    at Parser.error (/Users/my_project/assets/node_modules/stylelint-rscss/node_modules/postcss-selector-parser/dist/parser.js:234:15)
    at Parser.pseudo (/Users/my_project/assets/node_modules/stylelint-rscss/node_modules/postcss-selector-parser/dist/parser.js:332:25)
    at Parser.parse (/Users/my_project/assets/node_modules/stylelint-rscss/node_modules/postcss-selector-parser/dist/parser.js:549:22)
    at Parser.loop (/Users/my_project/assets/node_modules/stylelint-rscss/node_modules/postcss-selector-parser/dist/parser.js:517:18)
    at new Parser (/Users/my_project/assets/node_modules/stylelint-rscss/node_modules/postcss-selector-parser/dist/parser.js:104:21)
    at Processor.process (/Users/my_project/assets/node_modules/stylelint-rscss/node_modules/postcss-selector-parser/dist/processor.js:26:21)
    at flattenRule (/Users/my_project/assets/node_modules/stylelint-rscss/lib/helpers/flatten_rule.js:16:6)
    at visitRule (/Users/my_project/assets/node_modules/stylelint-rscss/lib/helpers/walk_selectors.js:40:5)
    at visit (/Users/my_project/assets/node_modules/stylelint-rscss/lib/helpers/walk_selectors.js:23:20)

Upon further investigation, it looks like it breaks on this:

// has a sad D:
.my-component
  font:
    weight: 800

// happy days
.my-component
  font-weight: 800

It also notably fails on:

.fail-component
  padding:
    top: 1rem

// not tested, but theoretically:
.might-die
  margin: auto
    bottom: 0
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

1 participant