Jardinero / stylelint-plugin

Stylelint plugin for all products based on IntelliJ Platform (IntelliJ IDEA, RubyMine, WebStorm, PhpStorm, PyCharm, AppCode, etc.)
MIT License
20 stars 4 forks source link

Phpstorm v2017.3 : Unknown CSS at-rule - Not using .stylelintrc file #14

Open TheFrankman opened 6 years ago

TheFrankman commented 6 years ago

This is my .stylelintrc which is sat in the project root

{
  "extends": "stylelint-config-recommended",
  "rules": {
    "at-rule-no-unknown": [
      true,
      {
        "ignoreAtRules": [
          "extend",
          "extends",
          "tailwind"
        ]
      }
    ],
    "block-no-empty": null
  }
}

In my css the following is getting highlighted as an error by stylelint @tailwind utilities;

The error is Unknown CSS at-rule

This should be being ignored by stylelint.

My configuration is

Node Interpreter : /user/local/bin/node Stylelint package : /usr/local/lib/node_modules/stylelint

Am i missing some configuration that tells the IDE / stylelint where to locate the .stylelintrc

TheFrankman commented 6 years ago

I have upgraded PHPstorm to v2018.1 and the issue persists.

niutech commented 6 years ago

PHPStorm supports Stylelint natively, have you tried it?

TheFrankman commented 6 years ago

@niutech Yes I have tried using File Watchers, even using the documentation you linked. It had the same issue which is why I came to use this repository.

terryupton commented 4 years ago

@thefrankman did you solve this? I’m trying to setup and have the same issue.

adrienrobertskoove commented 4 years ago

Still having this problem, any way to add @ rules manualy or change the linter ?

terryupton commented 4 years ago

Anyone managed to solve this at all? I have just come back to see if I can get this working again. cc @TheFrankman @adrienrobertskoove

terryupton commented 4 years ago

For anyone else, I believe this is down to PHPStorm running it's own inspection rules. It should be as straight forward as disabling these warnings in the PHPstorm Settings > Editor > Inspection

See below:

Screenshot 2020-02-18 at 12 24 41

unticking the 'Unknown CSS at-rule' has removed these warnings/highlights.

adrienrobertskoove commented 4 years ago

@terryupton No so far I just left them there. I'm afraid of disabling the whole @ rules as there's more than one and might pass on real errors. @import is not trigerring the linter but @screen, @apply does

MvnTruong commented 3 years ago

You can suppress this on a per-line basis with /*noinspection CssInvalidAtRule*/, so the top of your Tailwind's main.css file would look like this:

/*noinspection CssInvalidAtRule*/
@tailwind base;

/*noinspection CssInvalidAtRule*/
@tailwind components;

/*noinspection CssInvalidAtRule*/
@tailwind utilities;