Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

why stylefmt automatically adds new line after block? #326

@applemate

Description

@applemate

my stylelint rule in stylelint.rc

{
	"plugins": [
		"stylelint-scss"
	],
	"rules": {
		"function-calc-no-unspaced-operator":true,
		"function-linear-gradient-no-nonstandard-direction":true,
		"string-no-newline":true,
		"unit-no-unknown":true,
		"property-no-unknown":true,
		"keyframe-declaration-no-important":true,
		"block-no-empty":true,
		"indentation": "tab",
		"selector-pseudo-class-no-unknown":[true, {"ignorePseudoClasses": ["global"]}],
		"selector-pseudo-element-no-unknown":true,
		"selector-type-no-unknown":true,
		"media-feature-name-no-unknown":true,
		"at-rule-no-unknown":true,
		"comment-no-empty":true,
		"color-no-invalid-hex":true,
		"font-family-no-duplicate-names":true,
		"no-empty-source":true,
		"no-extra-semicolons":true,
		"no-unknown-animations":true,
		"declaration-block-no-duplicate-properties": true,
		"no-duplicate-selectors": true
	}
}

When I run stylelint fmt

it turns my original code

	.neo {
		width: 100%;
	}
	.kiu {
		padding-top: 80px;
	}

to this

	.neo {
		width: 100%;
	}
	
	.kiu {
		padding-top: 80px;
	}

There is a new new after .neo block in the formatted result. Even though I didn't set any rule about new line after block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions