This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

disallow-media-duplicate

1.2.0 • Public • Published

kiforks/disallow-media-duplicate

The rule that disables duplicate media queries.

Installation

npm install kiforks/disallow-media-duplicate --save-dev

Usage

If your project does not already have stylelint, then in the root of the project create the file .stylelintrc, or with the extension .stylelintrc.js so that the code editor can highlight the syntax.

Then add kiforks/disallow-media-duplicate to the .stylelintrc config file.

.stylelintrc

{
    "plugins": [
        "kiforks/disallow-media-duplicate"
    ],
    "rules": {
        "kiforks/disallow-media-duplicate": true
    }
}

ATTENTION! This config is for media mixins instead of media queries:

/* BAD */
.block {
	@include media-min(xs) {
            width: 300px;
	}

	@include media-min(xs) {
            height: 305px;
	}
}

/* GOOD */
.block {
	@include media-min(xs) {
            width: 300px;
            height: 305px;
	}
}

/disallow-media-duplicate/

    Package Sidebar

    Install

    npm i disallow-media-duplicate

    Weekly Downloads

    103

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    3.61 kB

    Total Files

    3

    Last publish

    Collaborators

    • kiforks