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

[Feature Request] Add support for scss linting rules #2

Closed
Celtech opened this issue Jun 28, 2022 · 2 comments
Closed

[Feature Request] Add support for scss linting rules #2

Celtech opened this issue Jun 28, 2022 · 2 comments

Comments

@Celtech
Copy link

Celtech commented Jun 28, 2022

Overview

This package is awesome, but when you have certain SCSS packages added, tailwind rules will fail.

Story

When using the package stylelint-config-sass-guidelines, we enable scss specific rules that tailwind rules fail on.

packages/app/src/assets/css/index.css
 1:1  ✖  Unexpected unknown at-rule "@tailwind"  scss/at-rule-no-unknown
 2:1  ✖  Unexpected unknown at-rule "@tailwind"  scss/at-rule-no-unknown
 3:1  ✖  Unexpected unknown at-rule "@tailwind"  scss/at-rule-no-unknown

Acceptance Criteria

Support the scss/at-rule-no-unknown rules for tailwind

Possible implementation

// index.js
module.exports = {
  rules: {
    'at-rule-no-unknown': [
      true,
      {
        ignoreAtRules: [
          'tailwind',
          'apply',
          'layer',
          /** tailwindcss v1, v2 */
          'variants',
          'responsive',
          'screen',
        ],
      },
    ],
+   'scss/at-rule-no-unknown': [
+     true,
+     {
+       ignoreAtRules: [
+         'tailwind',
+         'apply',
+         'layer',
+         'variants',
+         'responsive',
+         'screen'
+       ]
+     }
+   ],
    'function-no-unknown': [
      true,
      {
        ignoreFunctions: ['theme'],
      },
    ],
  },
};
@zhilidali
Copy link
Owner

Thank you for your Feature Request, please update the latest version and try using stylelint-config-tailwindcss/scss instead of stylelint-config-tailwindcss,For details, see commit.

@Celtech
Copy link
Author

Celtech commented Jun 30, 2022

Thank you for your Feature Request, please update the latest version and try using stylelint-config-tailwindcss/scss instead of stylelint-config-tailwindcss,For details, see commit.

@zhilidali Thanks for the quick work on this! Just tested it out and she's working perfectly!

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