Git Product home page Git Product logo

Comments (7)

mjbvz avatar mjbvz commented on July 28, 2024 1

Thanks @cchamberlain! Yes, the tags are currently case-sensitive.

@martaver Can you please try changing the case in your code, or configure uppercase Styled as a supported tag: https://github.com/Microsoft/typescript-styled-plugin#tags

from typescript-styled-plugin.

martaver avatar martaver commented on July 28, 2024

Also, not getting any syntax errors...

I would say that my plugin isn't getting triggered, and that I've stuffed up the configuration, but then where are these border, gradient and transition properties coming from?

from typescript-styled-plugin.

cchamberlain avatar cchamberlain commented on July 28, 2024

@martaver I think you're running into this because you are using an unusual convention for your styled-components default import (capitalized). The docs and all examples I've seen use:

import styled from "styled-components";

const Container = styled.div`
    margin: 1rem auto;
`;

When I make mine uppercase like yours, it appears to not work correctly. Not saying this shouldn't be supported, but you'd probably hit less issues with IDE plugins if you stick to the convention.

from typescript-styled-plugin.

martaver avatar martaver commented on July 28, 2024

Hi @mjbvz

Trying both over here, doesn't seem to be happening...

"plugins": [
        {
            "name": "typescript-styled-plugin",
            "tags": [
                "Styled",
                "styled",
                "Sty",
                "css"
            ]
        }
    ]

That's my tsconfig for client bundle. Also using lower-case styled now, no change in behavior.

It's odd that a few properties appear but not the rest.

Could it be a problem that my tsconfig is nested, in a folder deeper than the root?

from typescript-styled-plugin.

mjbvz avatar mjbvz commented on July 28, 2024

Yes, the suggestions in your screenshot are just VS Code's generic snippets that show up pretty much everywhere.

I suspect the plugin is not being activated. #9 tracks a similar problem. Currently, your tsconfig must be in the root folder. Can you please try creating a tsconfig at the root and seeing if the plugin is activated then?

from typescript-styled-plugin.

martaver avatar martaver commented on July 28, 2024

Still no dice... I'll try to spend some more time with it soon, but for now I have to drop it.

from typescript-styled-plugin.

mjbvz avatar mjbvz commented on July 28, 2024

Closing this out as not actionable.

If you are still blocked on this you can also try using the vscode styled components extension which now bundles this plugin

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.