Git Product home page Git Product logo

Comments (6)

Justin9606 avatar Justin9606 commented on July 28, 2024 1

I solved it by creating the jconfig.json inside the root of my project and adding:

if your project is in Typescript then create tsconfig.json*

{
"compilerOptions": {
"plugins": [
{
"name": "typescript-styled-plugin",
"lint": {
"validProperties": [
"margin-vertical",
"margin-horizontal",
"padding-vertical",
"padding-horizontal",
"shadow-color",
"shadow-opacity",
"shadow-radius",
"elevation"
]
}
}
]
}
}

from typescript-styled-plugin.

KingMatrix1989 avatar KingMatrix1989 commented on July 28, 2024

I have same problem

from typescript-styled-plugin.

AlonBru avatar AlonBru commented on July 28, 2024

Assuming you use vscode, try pressing ctrl+shift+p and then running the TypeScript: Restart TS Server command.
Seems to work for me.

from typescript-styled-plugin.

mattbrannon avatar mattbrannon commented on July 28, 2024

Same problem. Restarting TS Server didn't help.

from typescript-styled-plugin.

machineghost avatar machineghost commented on July 28, 2024

The CTRL + SHIFT + p and "Restart TS Server" solution might seem to solve this, but it doesn't really (or at least it didn't for me). All the errors disappeared the moment I did it ... but that was just because the TS server was restarting. When it finally finished restarting, the errors were back.

@Justin9606 is there some equivalent directive for CSS values? I'm getting this issue from this line of styled CSS:

 display: inline-block;

So whitelisting the property name won't help.

P.S. And it should go without saying (and yet this bug has been ignored for over a year, so I feel the need to say it) that developers should not have to copy every hyphenated property name and value into their jsconfig.json file just to be able to use the plugin :)

from typescript-styled-plugin.

mjbvz avatar mjbvz commented on July 28, 2024

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

from typescript-styled-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.