Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
eslint-config-typescript
Advanced tools
A base set of recommended ESLint rules for TypeScript projects
An opinionated set of ESLint rules for TypeScript projects
Install eslint-config-typescript:
$ npm install --save-dev eslint-config-typescript
Then, add eslint-config-typescript to the "extends" array in your ESLint file. Make sure to put it last, so it gets the chance to override other configs.
{
"extends": [
"typescript"
]
}
A few ESLint plugins are supported as well:
{
"extends": [
"typescript",
"typescript/react",
"typescript/prettier",
"typescript/prettier-react"
]
}
Note: typescript/prettier-react
will automatically import typescript/prettier
.
Using default prettier configurations:
{
"extends": [
"typescript",
"typescript/prettier"
],
"plugins": ["filenames", "jest"],
"env": {
"jest": true,
"node": true
},
"rules": {
"filenames/no-index": "error",
"filenames/match-exported": ["error", "kebab"],
"jest/no-disabled-tests": "error",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/valid-expect": "error"
}
}
Using specific react configurations:
{
"extends": [
"typescript",
"typescript/react",
"typescript/prettier-react"
],
"plugins": ["filenames", "jest"],
"env": {
"jest": true,
"node": true
},
"rules": {
"filenames/no-index": "error",
"filenames/match-exported": ["error", "kebab"],
"jest/no-disabled-tests": "error",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/valid-expect": "error",
"prettier/prettier": [
"error",
{
"semi": false,
"tabWidth": 4,
"singleQuote": true
}
]
}
}
FAQs
A base set of recommended ESLint rules for TypeScript projects
The npm package eslint-config-typescript receives a total of 35,977 weekly downloads. As such, eslint-config-typescript popularity was classified as popular.
We found that eslint-config-typescript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.