
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
eslint-plugin-emotion
Advanced tools
ESLint rules for emotion
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-emotion
:
$ npm install eslint-plugin-emotion --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-emotion
globally.
Add emotion
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["emotion"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"emotion/jsx": "error"
}
}
The Emotion 10 codemods are contained in this package. To use them, enable the rules shown below. Keeping these rules after migrating is also useful to have jsx
from @emotion/core
automatically imported when the css prop is used and other such things. You may also want to not enable certain rules while you are migrating, such the no-vanilla
rule.
{
"rules": {
"emotion/jsx-import": "error",
"emotion/no-vanilla": "error",
"emotion/import-from-emotion": "error",
"emotion/styled-import": "error
}
}
Note:
These rules assume you are using React, if you are not using React, you should keeping only using the
emotion
package.
FAQs
ESLint rules for emotion
The npm package eslint-plugin-emotion receives a total of 16,518 weekly downloads. As such, eslint-plugin-emotion popularity was classified as popular.
We found that eslint-plugin-emotion demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.