
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.
@ssh/eslint-config
Advanced tools
Slingshot's ESLint configuration for JavaScript, TypeScript, and React projects.
npm install --save-dev @ssh/eslint-config
Install the required peer dependencies:
# For ESLint 9 (flat config)
npm install --save-dev \
eslint@^9.0.0 \
@stylistic/eslint-plugin@^2.0.0 \
@typescript-eslint/eslint-plugin@^8.0.0 \
@typescript-eslint/parser@^8.0.0 \
eslint-plugin-import@^2.29.0 \
eslint-plugin-jsx-a11y@^6.8.0 \
eslint-plugin-react@^7.33.0 \
eslint-plugin-react-hooks@^4.6.0
Create an eslint.config.js
file in your project root:
import config from '@ssh/eslint-config';
export default config;
import base from '@ssh/eslint-config/base';
export default base;
import config from '@ssh/eslint-config';
export default [
...config,
{
// Your custom rules
rules: {
'no-console': 'warn',
}
}
];
⚠️ Note: ESLint 8 support is deprecated. Please upgrade to ESLint 9 for the best experience.
Create an .eslintrc.js
file:
module.exports = {
extends: ['@ssh/eslint-config/legacy'],
};
@ssh/eslint-config
)@ssh/eslint-config/base
)npm install --save-dev eslint@^9.0.0 @stylistic/eslint-plugin@^2.0.0 @typescript-eslint/eslint-plugin@^8.0.0 @typescript-eslint/parser@^8.0.0
Replace your .eslintrc.*
file with eslint.config.js
:
Before (.eslintrc.js):
module.exports = {
extends: ['@ssh'],
};
After (eslint.config.js):
import config from '@ssh/eslint-config';
export default config;
Flat config is automatically detected by ESLint 9. Your existing scripts should work without changes.
This configuration uses ESLint Stylistic for all formatting rules. This provides:
✅ Future-proof formatting - ESLint 9 removed many built-in formatting rules
✅ Consistent styling - All formatting rules in one place
✅ TypeScript-aware - Proper handling of TypeScript syntax
✅ JSX support - React/JSX formatting included
The configuration includes comprehensive formatting rules:
// Spacing and indentation
"@stylistic/indent": ["error", 4] // 4-space indentation (Slingshot override)
"@stylistic/quotes": ["error", "single"] // Single quotes
"@stylistic/semi": ["error", "always"] // Always semicolons
// Object and array formatting
"@stylistic/object-curly-spacing": ["error", "always"]
"@stylistic/comma-dangle": ["error", "always-multiline"]
// JSX formatting (React files)
"@stylistic/jsx-indent": ["error", 4]
"@stylistic/jsx-indent-props": ["error", 4]
This config includes several customizations from the standard Airbnb config:
// Indentation set to 4 spaces (via @stylistic)
"@stylistic/indent": ["error", 4]
// Import/export preferences
"import/prefer-default-export": "off"
// Console logging allowed
"no-console": "off"
// Type imports enforced
"@typescript-eslint/consistent-type-imports": "error"
The configuration automatically:
.ts
and .tsx
filesApache-2.0 - See LICENSE file for details.
FAQs
Slingshot's ESLint rules for JS, TS, and React
The npm package @ssh/eslint-config receives a total of 8 weekly downloads. As such, @ssh/eslint-config popularity was classified as not popular.
We found that @ssh/eslint-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
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.