Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

False errors shown for @apply #82

Closed
mjbvz opened this issue Nov 12, 2018 · 3 comments
Closed

False errors shown for @apply #82

mjbvz opened this issue Nov 12, 2018 · 3 comments

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Nov 12, 2018

From mjbvz/vscode-lit-html#45

Repo
For the code:

const a = styled.h1`
    @apply --bla;
`

Bug
False errors reported

This is likely caused by us using the scss language to get the errors instead of normal css language service

@mjbvz mjbvz changed the title False errors shown @apply for False errors shown for @apply Nov 12, 2018
@OnurGvnc
Copy link

tsconfig.json

https://github.com/Microsoft/typescript-styled-plugin#linting

it works as a workaround

{
  "compilerOptions": {
    "plugins": [
      {
        "name": "typescript-styled-plugin",
        "validate": false
      }
    ]
  }
}

@naoak
Copy link

naoak commented Jul 13, 2020

@mjbvz
vscode-css-languageservice seems to have already supported @apply rule since v4.0.3 by this commit.

package.json in this project (typescript-style-plugin@0.15.0) points vscode-css-languageservice at ~4.0.2, so there is no need to do anything in theory.

Updating dependencies of typescript-lit-html-plugin and vscode-lit-html will be work.
https://github.com/microsoft/typescript-lit-html-plugin/blob/master/package.json#L22
https://github.com/mjbvz/vscode-lit-html/blob/master/package.json#L154

@mjbvz
Copy link
Contributor Author

mjbvz commented Apr 4, 2023

Closing as this package has been deprecated in favor of the official styled-components/typescript-styled-plugin fork

After updating to that fork, follow up in the styled-components repo if this is still an issue

@mjbvz mjbvz closed this as completed Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants