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

Rules are not ignored when using SCSS namespace #4378

Closed
kimulaco opened this issue Oct 25, 2019 · 0 comments
Closed

Rules are not ignored when using SCSS namespace #4378

kimulaco opened this issue Oct 25, 2019 · 0 comments

Comments

@kimulaco
Copy link
Member

Overview

If you use the new Sass @use rule namespace, the rule will not be ignored and an error will occur.
I know the point to correct, so I will issue a PR!

I got a "font-family-no-missing-generic-family-keyword" error under the following circumstances.

// src/scss/_font.scss
$font-family-default: Arial, sans-serif;
// src/scss/_button.scss
@use "font" as font;

.button {
  font-family: font.$font-family-default;
}
src/scss/_button.scss
 4:16  ✖  Unexpected missing generic font family   font-family-no-missing-generic-family-keyword

stylelint-scss/stylelint-scss#387

Config

  • "stylelint": "^11.1.1",
  • "stylelint-config-standard": "^19.0.0",
  • "stylelint-scss": "^3.12.0"
// .stylelintrc.js
module.exports = {
    extends: 'stylelint-config-standard',
    plugins: [
        'stylelint-scss'
    ],
    rules: {
        'at-rule-no-unknown': null,
        'scss/at-rule-no-unknown': true
    }
}

Please refer to this repository for details.
https://github.com/kimulaco/dart-sass-example

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

No branches or pull requests

2 participants