{"id":13801470,"url":"https://github.com/ramda/eslint-plugin-ramda","last_synced_at":"2025-04-06T15:13:44.371Z","repository":{"id":47637541,"uuid":"109619605","full_name":"ramda/eslint-plugin-ramda","owner":"ramda","description":":ram: ESLint rules for use with Ramda","archived":false,"fork":false,"pushed_at":"2021-08-20T08:45:13.000Z","size":135,"stargazers_count":119,"open_issues_count":10,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-14T08:30:49.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ramda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-05T21:51:54.000Z","updated_at":"2023-04-20T10:40:17.000Z","dependencies_parsed_at":"2022-09-26T19:42:14.896Z","dependency_job_id":null,"html_url":"https://github.com/ramda/eslint-plugin-ramda","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramda%2Feslint-plugin-ramda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramda%2Feslint-plugin-ramda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramda%2Feslint-plugin-ramda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramda%2Feslint-plugin-ramda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramda","download_url":"https://codeload.github.com/ramda/eslint-plugin-ramda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247324803,"owners_count":20920697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:23.163Z","updated_at":"2025-04-06T15:13:44.350Z","avatar_url":"https://github.com/ramda.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Plugins"],"sub_categories":["Libraries"],"readme":"# eslint-plugin-ramda\n\n[![NPM Version](https://img.shields.io/npm/v/eslint-plugin-ramda.svg?style=flat)](https://www.npmjs.org/package/eslint-plugin-ramda)\n[![Build Status](https://api.travis-ci.org/ramda/eslint-plugin-ramda.svg?branch=master)](https://travis-ci.org/ramda/eslint-plugin-ramda)\n[![Code Coverage](https://codecov.io/gh/ramda/eslint-plugin-ramda/branch/master/graph/badge.svg)](https://codecov.io/gh/ramda/eslint-plugin-ramda)\n[![NPM Downloads](https://img.shields.io/npm/dm/eslint-plugin-ramda.svg?style=flat)](https://www.npmjs.org/package/eslint-plugin-ramda)\n\nESLint rules for pragmatic Ramda usage, refactoring and simplification\n\n## Installation\n\n```\n$ npm install --save-dev eslint eslint-plugin-ramda\n```\n\n## Usage\n\nConfigure it in `package.json`.\n\n```json\n{\n  \"name\": \"my-awesome-project\",\n  \"eslintConfig\": {\n    \"env\": {\n      \"es6\": true\n    },\n    \"plugins\": [\n      \"ramda\"\n    ],\n    \"rules\": {\n      \"ramda/always-simplification\": \"error\",\n      \"ramda/any-pass-simplification\": \"error\",\n      \"ramda/both-simplification\": \"error\",\n      \"ramda/complement-simplification\": \"error\",\n      \"ramda/compose-pipe-style\": \"error\",\n      \"ramda/compose-simplification\": \"error\",\n      \"ramda/cond-simplification\": \"error\",\n      \"ramda/either-simplification\": \"error\",\n      \"ramda/eq-by-simplification\": \"error\",\n      \"ramda/filter-simplification\": \"error\",\n      \"ramda/if-else-simplification\": \"error\",\n      \"ramda/map-simplification\": \"error\",\n      \"ramda/merge-simplification\": \"error\",\n      \"ramda/no-redundant-and\": \"error\",\n      \"ramda/no-redundant-not\": \"error\",\n      \"ramda/no-redundant-or\": \"error\",\n      \"ramda/pipe-simplification\": \"error\",\n      \"ramda/prefer-both-either\": \"error\",\n      \"ramda/prefer-complement\": \"error\",\n      \"ramda/prefer-ramda-boolean\": \"error\",\n      \"ramda/prop-satisfies-simplification\": \"error\",\n      \"ramda/reduce-simplification\": \"error\",\n      \"ramda/reject-simplification\": \"error\",\n      \"ramda/set-simplification\": \"error\",\n      \"ramda/unless-simplification\": \"error\",\n      \"ramda/when-simplification\": \"error\"\n    }\n  }\n}\n```\n\n## Rules\n\n- `always-simplification` - Detects when `always` usage can be replaced by a Ramda function\n- `any-pass-simplification` - Suggests simplifying list of negations in `anyPass` by single negation in `allPass`\n- `both-simplification` - Suggests transforming negated `both` conditions on negated `either`\n- `complement-simplification` - Forbids confusing `complement`, suggesting a better one\n- `compose-pipe-style` - Enforces `compose` for single line expression and `pipe` for multiline\n- `compose-simplification` - Detects when a function that has the same behavior already exists\n- `cond-simplification` - Forbids using `cond` when `ifElse`, `either` or `both` fits\n- `either-simplification` - Suggests transforming negated `either` conditions on negated `both`\n- `eq-by-simplification` - Forbids `eqBy(prop(_))` and suggests `eqProps`\n- `filter-simplification` - Forbids using negated `filter` and suggests `reject`\n- `if-else-simplification` - Suggests `when` and `unless` when it is possible to replace\n- `map-simplification` - Forbids `map(prop(_))` and suggests `pluck`\n- `merge-simplification` - Forbids `merge` when `assoc` fits\n- `no-redundant-and` - Forbids `and` with 2 parameters in favor of `\u0026\u0026`\n- `no-redundant-not` - Forbids `not` with 1 parameter in favor of `!`\n- `no-redundant-or` - Forbids `or` with 2 parameters in favor of `||`\n- `pipe-simplification` - Detects when a function that has the same behavior already exists\n- `prefer-both-either` - Enforces using `both`/`either` instead of `allPass`/`anyPass` with a list of only two predicates\n- `prefer-complement` - Enforces using `complement` instead of compositions using `not`\n- `prefer-ramda-boolean` - Enforces using `R.T` and `R.F` instead of explicit functions\n- `prop-satisfies-simplification` - Detects when can replace `propSatisfies` by more simple functions\n- `reduce-simplification` - Detects when can replace `reduce` by `sum` or `product`\n- `reject-simplification` - Forbids using negated `reject` and suggests `filter`\n- `set-simplification` - Forbids using `set` with `lensProp` in favor of `assoc`\n- `unless-simplification` - Forbids using negated `unless` and suggests `when`\n- `when-simplification` - Forbids using negated `when` and suggests `unless`\n\n## Recommended configuration\n\nThis plugin exports a [`recommended` configuration](index.js) that enforces good practices.\n\nTo enable this configuration, use the `extends` property in your `package.json`.\n\n```json\n{\n  \"name\": \"my-awesome-project\",\n  \"eslintConfig\": {\n    \"plugins\": [\n      \"ramda\"\n    ],\n    \"extends\": \"plugin:ramda/recommended\"\n  }\n}\n```\n\nSee [ESLint documentation](http://eslint.org/docs/user-guide/configuring#extending-configuration-files)\nfor more information about extending configuration files.\n\nMIT © @haskellcamargo and @lo1tuma\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framda%2Feslint-plugin-ramda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framda%2Feslint-plugin-ramda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framda%2Feslint-plugin-ramda/lists"}