gilbarbara / codeclimate-stylelint

A Code Climate engine for the mighty, modern CSS linter
24 stars 18 forks source link

Stylelint-scss scss/at-rule-no-unknown doesn't recognize @use and @forward #43

Closed nmkataoka closed 3 years ago

nmkataoka commented 4 years ago

Hi, thanks for supporting this plugin.

I'm using the stylelint-scss plugin and codeclimate is raising the following issue: Unexpected unknown at-rule "@use" (at-rule-no-unknown) (scss/at-rule-no-unknown)

This occurs both in the cloud version and using the cli locally.

The at rules @use and @forward were added to the stylelint-scss plugin in version 3.12 (current version is 3.18, codeclimate-stylelint lists ^3.9 in package.json). If this is indeed the cause of the issue, could the dependencies be updated?

.codeclimate.yml

version: "2"
checks:
  method-lines:
    config:
      threshold: 100
plugins:
  eslint:
    enabled: true
    channel: "eslint-6"
    config:
      config: ./.eslintrc.yml
      extensions:
        - .js
        - .jsx
    checks:
      import/extensions:
        enabled: false
  stylelint:
    enabled: true
    config:
        config: ./.stylelintrc.yml
  duplication:
    enabled: false
  fixme:
    enabled: true
    config:
      strings:
      - "http:"

.stylelintrc.yml

---
extends:
    stylelint-config-sass-guidelines
plugins:
    - stylelint-scss
    - stylelint-order
rules:
    at-rule-no-unknown: null
    at-rule-no-vendor-prefix: null
    declaration-no-important: true
    max-nesting-depth: 3
    order/properties-alphabetical-order: true
    no-duplicate-selectors: true
    property-no-vendor-prefix: null
    scss/at-rule-no-unknown: true
    selector-max-id: 0
    selector-no-qualifying-type: null
    selector-no-vendor-prefix: null
    value-no-vendor-prefix: null

In any .scss file, use an @use or @forward rule.

gilbarbara commented 4 years ago

Hey @nmkataoka

Feel free to submit a PR

gilbarbara commented 3 years ago

Updated in 2.3.0 (engine 13.7.2)