Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
eslint-config-sanity
Advanced tools
Readme
Shared eslint rules for official Sanity.io projects
npm install --save-dev eslint-config-sanity
Create an .eslintrc
in the root of your project (or an eslintConfig
entry in package.json
) and extend the sanity
config:
{
"env": {"node": true, "browser": true},
"extends": ["sanity"]
}
Adjust env
according to your use case, obviously.
ESLint requires plugins to be peer dependencies (they resolve relative to the end-user project), as such you need to install an additional dependency if you're using React:
npm install --save-dev eslint-plugin-react eslint-plugin-react-hooks
Then, make sure to extend sanity/react
in your .eslintrc
:
{
"extends": ["sanity/react"]
}
Note: It's not necessary to extend both sanity
and sanity/react
- extending sanity/react
will implicitly extend sanity
first.
Note: If you're using TypeScript and React, make sure you extend sanity/react
before sanity/typescript
:
{
"extends": ["sanity/react", "sanity/typescript"]
}
ESLint requires plugins to be peer dependencies (they resolve relative to the end-user project), as such you need to install a few more dependencies if you're using typescript:
npm install --save-dev \
typescript \
@typescript-eslint/parser \
@typescript-eslint/eslint-plugin
Then, make sure to extend sanity/typescript
in your .eslintrc
:
{
"extends": ["sanity/typescript"]
}
Note: It's not necessary to extend both sanity
and sanity/typescript
- extending sanity/typescript
will implicitly extend sanity
first.
Note: If you're using TypeScript and React, make sure you extend sanity/react
before sanity/typescript
:
{
"extends": ["sanity/react", "sanity/typescript"]
}
MIT © Sanity.io
FAQs
Shared eslint configs for sanity-io
The npm package eslint-config-sanity receives a total of 9,275 weekly downloads. As such, eslint-config-sanity popularity was classified as popular.
We found that eslint-config-sanity demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 46 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.