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

rule conflict with stylelint-config-standard #17

Open
lovelope opened this issue Jul 20, 2019 · 2 comments
Open

rule conflict with stylelint-config-standard #17

lovelope opened this issue Jul 20, 2019 · 2 comments

Comments

@lovelope
Copy link

stylelint.config.js file like this:

module.exports = {
  extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
  plugins: ['stylelint-order', 'stylelint-config-rational-order/plugin'],
  rules: {
    // `standard` conflict with `rational-order`
    'declaration-empty-line-before': [
      'never',
      {
        except: ['after-comment', 'after-declaration', 'first-nested'],
        ignore: [
          'after-comment',
          'after-declaration',
          'first-nested',
          'inside-single-line-block',
        ],
      },
    ],
    'order/properties-order': [],
    'plugin/rational-order': [
      true,
      {
        'border-in-box-model': false,
        'empty-line-between-groups': true,
      },
    ],
  },
};

When I using declaration-empty-line-before with empty-line-between-groups: true, one of the two rules not work.

So, If I only hope empty-line-between-groups: true rule works, how to configure it?

@rfgamaral
Copy link

I don't know if this is the correct/best way to do it, but it's at least a workaround. Here's a sample .stylelintrc which "fixes" the problem:

{
  "extends": [
    "stylelint-config-standard",
    "stylelint-config-rational-order",
    "stylelint-config-css-modules"
  ],
  "rules": {
    "declaration-empty-line-before": null, //<----------------------------------
    "indentation": 4,
    "order/properties-order": [],
    "plugin/rational-order": [
      true,
      {
        "empty-line-between-groups": true
      }
    ]
  }
}

@lovelope
Copy link
Author

I don't know if this is the correct/best way to do it, but it's at least a workaround. Here's a sample .stylelintrc which "fixes" the problem:

{
  "extends": [
    "stylelint-config-standard",
    "stylelint-config-rational-order",
    "stylelint-config-css-modules"
  ],
  "rules": {
    "declaration-empty-line-before": null, //<----------------------------------
    "indentation": 4,
    "order/properties-order": [],
    "plugin/rational-order": [
      true,
      {
        "empty-line-between-groups": true
      }
    ]
  }
}

Thank you, it's worked.

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

2 participants