
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.
@esatterwhite/eslint-config-reasonable
Advanced tools
ESLint config with reasonable comma first settings
eslint config with reasonable comma first settings for node.js projects
> npm install @esatterwhite/eslint-config-reasonable
Add a eslintConfig
block to you package.json
{
"eslintConfig": {
"root": true,
"extends": "@answerbook/eslint-config-reasonable",
"ignorePatterns": [
"node_modules/"
]
}
}
'use strict'
const path = require('path')
const fs = require('fs')
const {promisify} = require('util')
const crypto = require('crypto')
const readFile = promisify(fs.readFile)
const EXP = /\d+/
const SLEEP_MS = 150
const LONG_STRING = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
+ 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
+ 'abcdefghijklmnopqrstuvwxyz'
const OPTIONS = {
FOO: 1
, BAR: 2
, TEST: 'fake'
, LONG: LONG_STRING
}
const isFoo = OPTIONS.FOO
? OPTIONS.BAR
: OPTIONS.TEST
function getOptions() {
return isFoo ? OPTIONS : null
}
function rand(bytes = 10, cb) {
crypto.randomBytes(bytes, (err, buffer) => {
if (err) return cb(err)
cb(null, buffer.toString('hex'))
})
}
async function doWork(opts) {
const {x, y} = opts
try {
const file = await readFile(path.join(x, y))
return file
} catch (err) {
console.error(err)
return null
}
}
;(async () => {
await new Promise((resolve) => {
setTimeout(resolve, SLEEP_MS)
})
console.log('ready', 11 + 33)
})()
function plugin(opts) {
if (this.is_new) {
this.id = Date.now()
} else {
this.updated = new Date()
}
}
module.exports = {
...OPTIONS
, EXP
, rand
, getOptions
, doWork
, plugin
}
FAQs
ESLint config with reasonable comma first settings
The npm package @esatterwhite/eslint-config-reasonable receives a total of 0 weekly downloads. As such, @esatterwhite/eslint-config-reasonable popularity was classified as not popular.
We found that @esatterwhite/eslint-config-reasonable 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.