stormwarning / stylelint-config-recess-order

šŸ—‚ļø Recess-based property sort order for Stylelint.
ISC License
354 stars 22 forks source link

Font properties end up in between padding and border #380

Closed ArianeBouchardConformit closed 2 months ago

ArianeBouchardConformit commented 2 months ago

I have a Sass mixin, and for some reason, using this preset, font/text properties go between padding and border. That seems to make no sense to me. The rules don't even seem to call for that. I'm confused.

Before linting:

@mixin table-cell-reset {
   padding: 0;
   border: 0;
   font-weight: 400;
   text-align: left;
}

After linting:

@mixin table-cell-reset {
   padding: 0; 
   font-weight: 400;
   text-align: left;
   border: 0;
}

Here's my stylelint.config.mjs file:

const SEVERITIES = {
   error: 'error',
   warning: 'warning',
}

const STYLELINT_CONFIG = {
   extends: [
      'stylelint-config-recommended',
      'stylelint-config-standard-scss',
      'stylelint-config-standard-vue/scss',
      'stylelint-config-recess-order',
   ],
   overrides: [
      {
         files: [
            '*.vue',
            '**/*.vue',
            '*.scss',
            '**/*.scss',
         ],
         rules: {
            'property-disallowed-list': [ [ 'flex', 'background', 'font' ], { severity: SEVERITIES.error } ],
            'color-named': [ 'never', { severity: SEVERITIES.warning } ],
            'color-no-hex': [ true, { severity: SEVERITIES.warning } ],
            'declaration-no-important': [ true, { severity: SEVERITIES.warning } ],
         },
      },
   ],
}

export default STYLELINT_CONFIG

Here are some package versions from my package-lock.json:

ArianeBouchardConformit commented 2 months ago

Welp, I'm blind. The rules DO call for that. Feels weird to me that borders wouldn't go with margins and paddings, but not a bug at all.

Sorry. Closing the issue.

stormwarning commented 1 month ago

I appreciate the detailed report anyway šŸ™‚