Skip to content

'Space expected around operator' picks up class name dash as operator #929

@seeliang

Description

@seeliang

I did a quick search for ' space-around-operator' could not find anything related to this.

Hope it is a real unique issue this time.

rules

  space-around-operator:
    - 1
    - include: true

sass code

@mixin make-icon($name, $position: before, $prefix: null, $suffix: null) {
  $class: 'icon-#{$name}';
  @if $prefix != null {
    $class: #{$prefix}__#{$class};
  }

  @if $suffix != null {
    $class: #{$class}-#{$suffix}; // the sass lint error 
  }

  .#{$class} {
    @include add-icon($name, $position);
  }
}
  • expect no error
  • gulp sass 1.2.0
  • with Atom editor

full sass.yml

options:
  formatter: stylish
  merge-default-rules: false
rules:
  bem-depth:
    - 1
    - max-depth: 3
  border-zero:
    - 1
    - convention: 0
  brace-style:
    - 1
    - style: '1tbs'
    - allow-single-line: false
  class-name-format:
    - 1
    - convention: hyphenatedbem
  clean-import-paths:
    - 1
    - filename-extension: false
      leading-underscore: false
  empty-args: 1
  empty-line-between-blocks:
    - 1
    - ignore-single-line-rulesets: true
  extends-before-declarations: 1
  extends-before-mixins: 1
  final-newline:
    - 1
    - include: true
  force-attribute-nesting: 1
  force-element-nesting: 1
  force-pseudo-nesting: 1
  function-name-format:
    - 1
    - allow-leading-underscore: true
      convention: hyphenatedlowercase
  hex-length:
    - 1
    - style: short
  hex-notation:
    - 1
    - style: lowercase
  id-name-format:
    - 0
    - convention: hyphenatedlowercase
  indentation:
    - 1
    - size: 2
  leading-zero:
    - 1
    - include: false
  mixin-name-format:
    - 1
    - allow-leading-underscore: true
      convention: hyphenatedlowercase
  mixins-before-declarations: 1
  nesting-depth:
    - 1
    - max-depth: 3
  no-color-keywords: 1
  no-color-literals: 1
  no-combinators: 1
  no-css-comments: 1
  no-debug: 1
  no-duplicate-properties: 1
  no-empty-rulesets: 1
  no-extends: 0
  no-ids: 2
  no-important: 2
  no-invalid-hex: 1
  no-mergeable-selectors: 1
  no-misspelled-properties:
    - 1
    - extra-properties: []
  no-qualifying-elements:
    - 2
    - allow-element-with-attribute: false
      allow-element-with-class: false
      allow-element-with-id: false
  no-trailing-whitespace: 1
  no-trailing-zero: 1
  no-transition-all: 0
  no-url-protocols: 0
  no-vendor-prefixes:
    - 1
    - additional-identifiers: []
      excluded-identifiers: []
  placeholder-in-extend: 1
  placeholder-name-format:
    - 0
    - convention: hyphenatedlowercase
  property-sort-order:
    - 1
    - ignore-custom-properties: false
  property-units:
    - 1
    - global:
        - ch
        - em
        - ex
        - rem
        - cm
        - in
        - mm
        - pc
        - pt
        - px
        - q
        - vh
        - vw
        - vmin
        - vmax
        - deg
        - grad
        - rad
        - turn
        - ms
        - s
        - Hz
        - kHz
        - dpi
        - dpcm
        - dppx
        - '%'
      per-property: {}
  quotes:
    - 1
    - style: single
  shorthand-values:
    - 1
    - allowed-shorthands:
        - 1
        - 2
        - 3
  single-line-per-selector: 1
  space-after-bang:
    - 1
    - include: false
  space-after-colon:
    - 1
    - include: true
  space-after-comma:
    - 1
    - include: true
  space-around-operator:
    - 1
    - include: true
  space-before-bang:
    - 1
    - include: true
  space-before-brace:
    - 1
    - include: true
  space-before-colon: 1
  space-between-parens:
    - 1
    - include: false
  trailing-semicolon: 1
  url-quotes: 1
  variable-for-property:
    - 0
    - properties: []
  variable-name-format:
    - 1
    - allow-leading-underscore: true
      convention: hyphenatedlowercase
  zero-unit: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions