sasstools / sass-lint

Pure Node.js Sass linting
MIT License
1.77k stars 534 forks source link

trailing-semicolon false-positive in properties with nested properties #1289

Open Grawl opened 5 years ago

Grawl commented 5 years ago

What version of Sass Lint are you using?

"sass-lint": "^1.13.1"

Please include any relevant parts of your configuration

```yml files: include: 'path/to/**/*.{sass,scss}' rules: attribute-quotes: - 1 - include: true bem-depth: - 0 border-zero: - 1 - convention: none brace-style: - 1 - style: stroustrup allow-single-line: false class-name-format: - 0 clean-import-paths: - 1 - leading-underscore: false filename-extension: false declarations-before-nesting: - 1 empty-args: - 1 - include: false empty-line-between-blocks: - 1 - include: false extends-before-declarations: - 1 extends-before-mixins: - 1 final-newline: - 1 - include: true force-attribute-nesting: - 0 force-element-nesting: - 0 force-pseudo-nesting: - 0 function-name-format: - 0 hex-length: - 0 hex-notation: - 0 id-name-format: - 0 indentation: - 0 leading-zero: - 1 - include: true max-file-line-count: - 1 - length: 300 max-line-length: - 0 mixin-name-format: - 0 mixins-before-declarations: - 0 nesting-depth: - 0 no-attribute-selectors: - 0 no-color-hex: - 1 no-color-keywords: - 0 no-color-literals: - 0 no-combinators: - 0 no-css-comments: - 1 no-debug: - 0 no-disallowed-properties: - 0 no-duplicate-properties: - 1 no-empty-rulesets: - 0 no-extends: - 0 no-ids: - 1 no-important: - 2 no-invalid-hex: - 0 no-mergeable-selectors: - 1 no-misspelled-properties: - 2 - extra-properties: - -webkit-overflow-scrolling - border-top-radius - border-bottom-radius - border-left-radius - border-right-radius - size - max-size - margin-x - margin-y - padding-x - padding-y - border-x - border-y - border-x-color - border-y-color - absolute - fixed - relative no-qualifying-elements: - 1 - allow-element-with-attribute: true no-trailing-whitespace: - 1 no-trailing-zero: - 1 no-transition-all: - 2 no-universal-selectors: - 0 no-url-domains: - 2 no-url-protocols: - 2 no-vendor-prefixes: - 1 - additional-identifiers: - khtml - o ignore-non-standard: true no-warn: - 0 one-declaration-per-line: - 1 placeholder-in-extend: - 0 placeholder-name-format: - 0 property-sort-order: - 0 property-units: - 0 pseudo-element: - 2 quotes: - 1 - style: single shorthand-values: - 2 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 - include: false space-between-parens: - 1 - include: false trailing-semicolon: - 1 - include: true url-quotes: - 1 variable-for-property: - 0 variable-name-format: - 0 zero-unit: - 2 - include: false ```

What did you do? Please include the actual source code causing the issue.

изображение
.foo {
    font: 20px/24px fantasy {
        weight: bold;
    }
}

or

.bar {
    transform: translateX(-1px) {
        origin: top left;
        style: preserve-3d;
    }
}

No translateX — no warning:

.foo {
    transform: {
        origin: top left;
        style: preserve-3d;
    }

No nested properties — no warning:

.foo {
    transform: translateX(-1px);
}

What did you expect to happen?

No warnings or errors.

What actually happened? Please include any error messages given to you by Sass Lint.

Sass Lint: Trailing semicolons required (trailing semicolon)

If you're using a IDE plugin have you tried the CLI too?

I am using plugin for Intellij IDEA, but CLI causes this issue too:

   7:8   warning  Trailing semicolons required  trailing-semicolon