Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why stylefmt automatically adds new line after block? #326

Open
craigcosmo opened this issue Nov 10, 2017 · 0 comments
Open

why stylefmt automatically adds new line after block? #326

craigcosmo opened this issue Nov 10, 2017 · 0 comments

Comments

@craigcosmo
Copy link

craigcosmo commented Nov 10, 2017

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.

@craigcosmo craigcosmo changed the title why stylefmt automatically add new line after block? why stylefmt automatically adds new line after block? Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant