Stylelint: font-family-no-duplicate-names false positive

Created on 1 Feb 2017  Â·  3Comments  Â·  Source: stylelint/stylelint

Describe the issue. Is it a bug or a feature request (new rule, new option, etc.)?

While running that tool against normalize.css source code, I have noticed a false positive.

Which rule, if any, is this issue related to?

It's affecting the font-family-no-duplicate-names rule.

What CSS is needed to reproduce this issue?

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

code,
kbd,
pre,
samp {
  font-family: monospace, monospace; /* 1 */
}

What stylelint configuration is needed to reproduce this issue?

module.exports = {
  extends: 'stylelint-config-standard',
  plugins: [
    'stylelint-declaration-use-variable',
  ],
};

Which version of stylelint are you using?

7.7.1

What did you expect to happen?

No warnings to be flagged.
That duplication seems still required. https://github.com/necolas/normalize.css/pull/654.
I would understand if you decide no to fix the issue. That fix is a decade old.
I'm not sure that it's still relevant.

What actually happened (e.g. what warnings or errors you are getting)?

The following warnings were flagged:

normalize.scss
 224:27  ✖  Unexpected duplicate name monospace   font-family-no-duplicate-names

Most helpful comment

Definitely not a "false positive", right? Because it's working exactly as expected? What you have there is a weird exception. I think /* stylelint-disable */ comments are the best way to handle such weird exceptions.

All 3 comments

Definitely not a "false positive", right? Because it's working exactly as expected? What you have there is a weird exception. I think /* stylelint-disable */ comments are the best way to handle such weird exceptions.

@oliviertassinari Thanks for using the template.

Dupe of https://github.com/stylelint/stylelint/issues/2086.

Either use /* stylelint-disable */ or consider contributing option.

Thanks for the quick answer. I'm late to the party.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

verpixelt picture verpixelt  Â·  3Comments

devsnice picture devsnice  Â·  3Comments

jeddy3 picture jeddy3  Â·  3Comments

jeddy3 picture jeddy3  Â·  3Comments

XhmikosR picture XhmikosR  Â·  3Comments