Unexpected unknown at-rule "@define-mixin" (at-rule-no-unknown) scss/at-rule-no-unknown

See original GitHub issue

Define mixing give me error while using stylelint fix command

Following is my config file for stylelint

.stylelintrc

/**
 * React Starter Kit (https://www.reactstarterkit.com/)
 *
 * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.txt file in the root directory of this source tree.
 */

// stylelint configuration
// https://stylelint.io/user-guide/configuration/
module.exports = {
  // The standard config based on a handful of CSS style guides
  // https://github.com/stylelint/stylelint-config-standard
  extends:  [
    "stylelint-config-standard",
    "stylelint-config-recommended-scss"
  ],

  plugins: [
    // stylelint plugin to sort CSS rules content with specified order
    // https://github.com/hudochenkov/stylelint-order
    'stylelint-order',
  ],

  rules: {
    'property-no-unknown': [
      true,
      {
        ignoreProperties: [
          // CSS Modules composition
          // https://github.com/css-modules/css-modules#composition
          'composes',
        ],
      },
    ],

    'selector-pseudo-class-no-unknown': [
      true,
      {
        ignorePseudoClasses: [
          // CSS Modules :global scope
          // https://github.com/css-modules/css-modules#exceptions
          'global',
          'local',
        ],
      },
    ],

    // Opinionated rule, you can disable it if you want
    'string-quotes': 'single',

    // https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md
    'order/order': [
      'custom-properties',
      'dollar-variables',
      'declarations',
      'at-rules',
      'rules',
    ],

    // https://github.com/hudochenkov/stylelint-order/blob/master/rules/properties-order/README.md
    'order/properties-order': [],
	 "no-descending-specificity": null,
      "at-rule-no-unknown": [ true, {
      ignoreAtRules: ['extend', 'at-root', 'debug', 'warn', 'error', 'if', 'else', 'for', 'each', 'while', 'mixin', 'include', 'content', 'return', 'function']
    }]
  },
};

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
nisargrthakkarcommented, Aug 6, 2018

@hudochenkov Yes, I have checked and its PostCSS syntax so I need to disable this rule now.

@hudochenkov @jeddy3 Thank you for your replay.

1reaction
jeddy3commented, Aug 6, 2018

You’ll have to disable this rule.

Alternatively, you can use the ignoreAtRule secondary option to allow @define-mixin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Unexpected unknown at-rule "@define-mixin" - SonarQube
I am getting error when using Postcss, it says: Unexpected unknown at-rule “@define-mixin” Im not sure how to handle this, since i assume...
Read more >
css - Unexpected unknown at-rule "@tailwind" scss/at-rule-no ...
Does this help? rules: { 'at-rule-no-unknown': null, 'scss/at-rule-no-unknown': [ true, { 'ignoreAtRules': ['tailwind'] } ], }.
Read more >
at-rule-no-unknown - Stylelint
Disallow unknown at-rules. ... This rule considers at-rules defined in the CSS Specifications, up to and including Editor's Drafts, to be known. Options​....
Read more >
unexpected unknown at-rule "@use" - You.com - You.com
Configure stylelint to use at-rule-no-unknown, then try to use an @layer rule in your css. What Stylelint configuration is needed to reproduce the...
Read more >
SonarCloud: Fixing unexpected unknown at-rule @tailwind - Tim
SonarCloud: Fixing unexpected unknown at-rule @tailwind. 31 March 2022. I'm a big fan of using SonarCloud. Not only does it help to maintain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found