
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@kael89/eslint-config-js
Advanced tools
ESLint configuration for JavaScript projects
This the base ESLint configuration I use in personal JavaScript projects:
yarn add -D @kael89/eslint-config-js eslint prettier
{
"eslintConfig": {
"extends": "@kael89/js"
}
}
If you are using the new JSX transform from React 17, extend react/jsx-runtime
in your eslint config (add "plugin:react/jsx-runtime" to "extends") to disable the relevant rules. See eslint-plugin-react for more information.
import/no-extraneous-dependencies will complain if dependencies used in tests are specified as devDependencies
. This is a false positive, and we can use the following configuration to avoid it:
{
"rules": {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["**/__tests__/**"],
"packageDir": [".", "../../"] // can skip if project is not a monorepo
}
]
}
}
devDependencies
: a pattern that matches our test filespackageDir
: a list of paths where package.json
files will be loaded from (optional)The exact configuration will depend on your setup.
Tip: If you are using VSCode to open a monorepo, you may get better linting results for rules that need to scan the project upwards if you load it as a multi-root workspace. You can then use
"packageDir": [".", "../../"]
in your eslint config to load dependencies from both the current workspace and the rootpackage.json
.
FAQs
ESLint configuration for JavaScript projects
We found that @kael89/eslint-config-js 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.