Skip to content

Ignore the style declaration order declared in the top level of Vue #180

Open
@otomad

Description

For example, if config in .stylelintrc:

{
    rules: {
        "order/order": [
            "at-rules",
	    "dollar-variables",
	    "declarations",
	    "rules",
	],
    },
}

Then declare styles in Vue:

<style lang="scss">
    $foo: bar;

    .foo {
        color: red;
    }

    @include my-mixin;
</style>

stylelint-order will raise an error:

Expected blockless @include to come before rule (order/order)

And convert it to:

<style lang="scss">
    @include my-mixin;

    $foo: bar;

    .foo {
        color: red;
    }
</style>

However, I want the order only works in the declarations, not on the top level.

And if declare these style declarations in a single scss file instead of vue, it can work correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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