
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
eslint-plugin-ramda
Advanced tools
ESLint rules for pragmatic Ramda usage, refactoring and simplification
$ npm install --save-dev eslint eslint-plugin-ramda
Configure it in package.json
.
{
"name": "my-awesome-project",
"eslintConfig": {
"env": {
"es6": true
},
"plugins": [
"ramda"
],
"rules": {
"ramda/always-simplification": "error",
"ramda/any-pass-simplification": "error",
"ramda/both-simplification": "error",
"ramda/complement-simplification": "error",
"ramda/compose-pipe-style": "error",
"ramda/compose-simplification": "error",
"ramda/cond-simplification": "error",
"ramda/either-simplification": "error",
"ramda/eq-by-simplification": "error",
"ramda/filter-simplification": "error",
"ramda/if-else-simplification": "error",
"ramda/map-simplification": "error",
"ramda/merge-simplification": "error",
"ramda/no-redundant-and": "error",
"ramda/no-redundant-not": "error",
"ramda/no-redundant-or": "error",
"ramda/pipe-simplification": "error",
"ramda/prefer-both-either": "error",
"ramda/prefer-complement": "error",
"ramda/prefer-ramda-boolean": "error",
"ramda/prop-satisfies-simplification": "error",
"ramda/reduce-simplification": "error",
"ramda/reject-simplification": "error",
"ramda/set-simplification": "error",
"ramda/unless-simplification": "error",
"ramda/when-simplification": "error"
}
}
}
always-simplification
- Detects when always
usage can be replaced by a Ramda functionany-pass-simplification
- Suggests simplifying list of negations in anyPass
by single negation in allPass
both-simplification
- Suggests transforming negated both
conditions on negated either
complement-simplification
- Forbids confusing complement
, suggesting a better onecompose-pipe-style
- Enforces compose
for single line expression and pipe
for multilinecompose-simplification
- Detects when a function that has the same behavior already existscond-simplification
- Forbids using cond
when ifElse
, either
or both
fitseither-simplification
- Suggests transforming negated either
conditions on negated both
eq-by-simplification
- Forbids eqBy(prop(_))
and suggests eqProps
filter-simplification
- Forbids using negated filter
and suggests reject
if-else-simplification
- Suggests when
and unless
when it is possible to replacemap-simplification
- Forbids map(prop(_))
and suggests pluck
merge-simplification
- Forbids merge
when assoc
fitsno-redundant-and
- Forbids and
with 2 parameters in favor of &&
no-redundant-not
- Forbids not
with 1 parameter in favor of !
no-redundant-or
- Forbids or
with 2 parameters in favor of ||
pipe-simplification
- Detects when a function that has the same behavior already existsprefer-both-either
- Enforces using both
/either
instead of allPass
/anyPass
with a list of only two predicatesprefer-complement
- Enforces using complement
instead of compositions using not
prefer-ramda-boolean
- Enforces using R.T
and R.F
instead of explicit functionsprop-satisfies-simplification
- Detects when can replace propSatisfies
by more simple functionsreduce-simplification
- Detects when can replace reduce
by sum
or product
reject-simplification
- Forbids using negated reject
and suggests filter
set-simplification
- Forbids using set
with lensProp
in favor of assoc
unless-simplification
- Forbids using negated unless
and suggests when
when-simplification
- Forbids using negated when
and suggests unless
This plugin exports a recommended
configuration that enforces good practices.
To enable this configuration, use the extends
property in your package.json
.
{
"name": "my-awesome-project",
"eslintConfig": {
"plugins": [
"ramda"
],
"extends": "plugin:ramda/recommended"
}
}
See ESLint documentation for more information about extending configuration files.
MIT © @haskellcamargo and @lo1tuma
FAQs
ESLint rules for use with Ramda
The npm package eslint-plugin-ramda receives a total of 15,604 weekly downloads. As such, eslint-plugin-ramda popularity was classified as popular.
We found that eslint-plugin-ramda demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.