Gathering detailed insights and metrics for typescript-styled-plugin
Gathering detailed insights and metrics for typescript-styled-plugin
Gathering detailed insights and metrics for typescript-styled-plugin
Gathering detailed insights and metrics for typescript-styled-plugin
typescript-plugin-styled-components
TypeScript transformer for improving the debugging experience of styled-components
typescript-styled-components-plugin
A styled-components plugin to minify & set componentId & displayName for typescript
@styled/typescript-styled-plugin
TypeScript language service plugin that adds IntelliSense for styled components
typescript-styled-rn-plugin
TypeScript language service plugin that adds IntelliSense for styled components for React Native
TypeScript server plugin that adds intellisense to styled component css strings
npm install typescript-styled-plugin
Typescript
Module System
Node Version
NPM Version
91
Supply Chain
98.5
Quality
75.8
Maintenance
100
Vulnerability
100
License
JavaScript (54.08%)
TypeScript (45.92%)
Total Downloads
13,221,261
Last Day
8,514
Last Week
33,647
Last Month
141,921
Last Year
2,001,719
840 Stars
300 Commits
57 Forks
23 Watching
2 Branches
74 Contributors
Minified
Minified + Gzipped
Latest Version
0.18.3
Package Id
typescript-styled-plugin@0.18.3
Unpacked Size
78.36 kB
Size
19.00 kB
File Count
33
NPM Version
8.19.3
Node Version
16.19.1
Publised On
04 Apr 2023
Cumulative downloads
Total Downloads
Last day
25%
8,514
Compared to previous day
Last week
-5.2%
33,647
Compared to previous week
Last month
10.7%
141,921
Compared to previous month
Last year
-15%
2,001,719
Compared to previous year
5
❗️ This package has been deprecated in favor of Styled component's fork.
TypeScript server plugin that adds intellisense to styled component css strings
Features
This plugin requires TypeScript 2.4 or later. It can provide intellisense in both JavaScript and TypeScript files within any editor that uses TypeScript to power their language features. This includes VS Code, Sublime with the TypeScript plugin, Atom with the TypeScript plugin, Visual Studio, and others.
Just install the VS Code Styled Components extension. This extension adds syntax highlighting and IntelliSense for styled components in JavaScript and TypeScript files.
If you are using a workspace version of TypeScript however, you must manually install the plugin along side the version of TypeScript in your workspace:
1npm install --save-dev typescript-styled-plugin typescript
Then add a plugins
section to your tsconfig.json
or jsconfig.json
1{ 2 "compilerOptions": { 3 "plugins": [ 4 { 5 "name": "typescript-styled-plugin" 6 } 7 ] 8 } 9}
Finally, run the Select TypeScript version
command in VS Code to switch to use the workspace version of TypeScript for VS Code's JavaScript and TypeScript language support. You can find more information about managing typescript versions in the VS Code documentation.
This plugin works with the Sublime TypeScript plugin.
First install the plugin and a copy of TypeScript in your workspace:
1npm install --save-dev typescript-styled-plugin typescript
And configure Sublime to use the workspace version of TypeScript by setting the typescript_tsdk
setting in Sublime:
1{ 2 "typescript_tsdk": "/Users/matb/my-amazing-project/node_modules/typescript/lib" 3}
Finally add a plugins
section to your tsconfig.json
or jsconfig.json
and restart Sublime.
1{ 2 "compilerOptions": { 3 "plugins": [ 4 { 5 "name": "typescript-styled-plugin" 6 } 7 ] 8 } 9}
This plugin works with the Atom TypeScript plugin.
First install the plugin and a copy of TypeScript in your workspace:
1npm install --save-dev typescript-styled-plugin typescript
Then add a plugins
section to your tsconfig.json
or jsconfig.json
and restart Atom.
1{ 2 "compilerOptions": { 3 "plugins": [ 4 { 5 "name": "typescript-styled-plugin" 6 } 7 ] 8 } 9}
To get sytnax highlighting for styled strings in Atom, consider installing the language-babel extension.
This plugin works Visual Studio 2017 using the TypeScript 2.5+ SDK.
First install the plugin in your project:
1npm install --save-dev typescript-styled-plugin
Then add a plugins
section to your tsconfig.json
.
1{ 2 "compilerOptions": { 3 "plugins": [ 4 { 5 "name": "typescript-styled-plugin" 6 } 7 ] 8 } 9}
Then reload your project to make sure the plugin has been loaded properly. Note that jsconfig.json
projects are currently not supported in VS.
This plugin adds styled component IntelliSense to any template literal tagged with styled
, css
, injectGlobal
, keyframes
or createGlobalStyle
:
1import styled from 'styled-components' 2 3styled.button` 4 color: blue; 5`
You can enable IntelliSense for other tag names by configuring "tags"
:
1{ 2 "compilerOptions": { 3 "plugins": [ 4 { 5 "name": "typescript-styled-plugin", 6 "tags": [ 7 "styled", 8 "css", 9 "sty" 10 ] 11 } 12 ] 13 } 14}
Now strings tagged with either styled
, css
, or sty
will have styled component IntelliSense:
1import sty from 'styled-components' 2 3sty.button` 4 color: blue; 5`
Tags also apply to methods on styled components. This is enabled for extend
by default:
1import sty from 'styled-components' 2 3const BlueButton = sty.button` 4 color: blue; 5` 6 7const MyFancyBlueButton = BlueButton.extend` 8 border: 10px solid hotpink; 9`
To disable error reporting, set "validate": false
in the plugin configuration:
1{ 2 "compilerOptions": { 3 "plugins": [ 4 { 5 "name": "typescript-styled-plugin", 6 "validate": false 7 } 8 ] 9 } 10}
You can also configure how errors are reported using linter settings.
1{ 2 "compilerOptions": { 3 "plugins": [ 4 { 5 "name": "typescript-styled-plugin", 6 "lint": { 7 "vendorPrefix": "error", 8 "zeroUnits": "ignore" 9 } 10 } 11 ] 12 } 13}
The following lint options are supported:
["property1", "property2", ....]
List of properties that are treated as valid.
"ignore" | "warning" | "error"
Should unknown properties show an error or warning? Default is "warning"
.
"ignore" | "warning" | "error"
When using a vendor-specific prefix make sure to also include all other vendor-specific properties. Default is "ignore"
.
"ignore" | "warning" | "error"
When using a vendor-specific prefix also include the standard property. Default is "warning"
.
"ignore" | "warning" | "error"
Do not use duplicate style definitions. Default is "ignore"
.
"ignore" | "warning" | "error"
Do not use empty rulesets. Default is "ignore"
.
"ignore" | "warning" | "error"
Import statements do not load in parallel. Default is "ignore"
.
"ignore" | "warning" | "error"
Do not use width or height when using padding or border. Default is "ignore"
.
"ignore" | "warning" | "error"
The universal selector (*) is known to be slow. Default is "ignore"
.
"ignore" | "warning" | "error"
No unit for zero needed. Default is "ignore"
.
"ignore" | "warning" | "error"
@font-face rule must define 'src' and 'font-family' properties. Default is "warning"
.
"ignore" | "warning" | "error"
Hex colors must consist of three or six hex numbers. Default is "error"
.
"ignore" | "warning" | "error"
Invalid number of parameters. Default is "error"
.
"ignore" | "warning" | "error"
IE hacks are only necessary when supporting IE7 and older. Default is "ignore"
.
"ignore" | "warning" | "error"
Unknown vendor specific property. Default is "ignore"
.
"ignore" | "warning" | "error"
Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect. Default is "warning"
"ignore" | "warning" | "error"
Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored. Default is "ignore"
.
"ignore" | "warning" | "error"
Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes. Default is "ignore"
.
"ignore" | "warning" | "error"
Selectors should not contain IDs because these rules are too tightly coupled with the HTML. Default is "ignore"
.
You can now see your Emmet abbreviations expanded and included in the completion list.
An upstream issue with typescript blocks the Emmet entry in the completion list to get updated as you type.
So for now you will have to press Ctrl+Space
after typing out the abbreviation.
The below settings which are in sync with general Emmet settings in VS Code control the expanded Emmet abbreviations in the auto-completion list.
"always" | "never"
Controls whether or not expanded Emmet abbreviations should show up in the completion list
`true` | `false`
If true, then Emmet suggestions will show up as snippets allowing you to order them as per editor.snippetSuggestions setting.
Preferences used to modify behavior of some actions and resolvers of Emmet.
To build the typescript-styled-plugin, you'll need Git and Node.js.
First, fork the typescript-styled-plugin repo and clone your fork:
1git clone https://github.com/YOUR_GITHUB_ACCOUNT_NAME/typescript-styled-plugin.git 2cd typescript-styled-plugin
Then install dev dependencies:
1npm install
The plugin is written in TypeScript. The source code is in the src/
directory with the compiled JavaScript output to the lib/
directory. Kick off a build using the compile
script:
1npm run compile
switch to e2
to install or update test dependencies:
1(cd e2e && npm install)
and then navigate back to the project root and run the end to end tests with the e2e
script:
1cd .. 2npm run e2e
You can submit bug fixes and features through pull requests. To get started, first checkout a new feature branch on your local repo:
1git checkout -b my-awesome-new-feature-branch
Make the desired code changes, commit them, and then push the changes up to your forked repository:
1git push origin my-awesome-new-feature-branch
Then submit a pull request against the Microsoft typescript-styled-plugin repository.
Please also see our Code of Conduct.
Code originally forked from: https://github.com/Quramy/ts-graphql-plugin
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 6/11 approved changesets -- score normalized to 5
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
12 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More