2

グラントファイル内

stylelint: {
    all: ['app/styles/**/*.scss']
},

.stylelintrc

{
    "plugins": [
        "stylelint-selector-bem-pattern"
    ],
    "rules": {
      "plugin/selector-bem-pattern": {
      "componentName": "[A-Z]+",
      "componentSelectors": {
        "initial": "^\\.{componentName}(?:-[a-z]+)?$",
        "combined": "^\\.combined-{componentName}-[a-z]+$"
      },
      "utilitySelectors": "^\\.util-[a-z]+$"
    }
    }
}

/Users/jitendravyas/app-test/styles/components/_campaign-settings-integrations.scss

/* @define campaign-settings */

.campaign-settings__integrations {
  @include flex;
}

.campaign-settings__integration {
  border: 1px solid $color-green;
  border-radius: 3px;
  color: $color-green;
  margin-right: $base-spacing-unit;
  @include flex;

  .check {
    background: $color-green;
    color: white;
    @include vertical-center;
  }

  > div {
    padding: $half-spacing-unit;
  }
}

stylelint を実行してもエラーが発生しません。Stylelint は他のルールと連携しています。

4

1 に答える 1