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

Warns "Warning: duplicate property or selector, consider merging" for @require statements #36

Closed
awayken opened this issue Feb 20, 2015 · 1 comment
Labels

Comments

@awayken
Copy link
Contributor

awayken commented Feb 20, 2015

When the "duplicates" flag is set to true, multiple @require statements are warned as being duplicates even if they require different stylus files. To recreate the issue, create the following files and run the command at the bottom.

base.styl

body {
    color: red;
}

otherfile.styl

p {
    padding: 4em;
}

site.styl

@require 'base';
@require 'otherfile';

config.json

{
    "alphabetical": false,
    "borderNone": false,
    "brackets": false,
    "colons": false,
    "commaSpace": false,
    "commentSpace": false,
    "cssLiteral": false,
    "depthLimit": false,
    "duplicates": true,
    "efficient": false,
    "enforceBlockStyle": false,
    "enforceVarStyle": false,
    "extendPref": false,
    "globalDupe": false,
    "indentSpaces": false,
    "leadingZero": false,
    "maxWarnings": false,
    "maxWarningsKill": false,
    "mixed": false,
    "namingConvention": false,
    "parenSpace": false,
    "placeholders": false,
    "semicolons": false,
    "Whitespace": false,
    "universal": false,
    "valid": false,
    "zeroUnits": false,
    "zIndexDuplicates": false,
    "zIndexNormalize": false
}

Then execute this:

$ stylint site.styl -c config.json
Warning:  duplicate property or selector, consider merging
File: site.styl
Line: 2: @require 'otherfile';
@rossPatton rossPatton added the bug label Feb 20, 2015
@rossPatton
Copy link
Collaborator

this should be fixed in the latest version, 0.8.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants