{"id":13496437,"url":"https://github.com/buildo/eslint-plugin-fp-ts","last_synced_at":"2025-05-16T03:06:38.419Z","repository":{"id":37965591,"uuid":"325391135","full_name":"buildo/eslint-plugin-fp-ts","owner":"buildo","description":"ESLint rules for fp-ts","archived":false,"fork":false,"pushed_at":"2025-03-03T16:18:20.000Z","size":363,"stargazers_count":112,"open_issues_count":39,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-19T13:38:52.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buildo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-29T21:31:41.000Z","updated_at":"2025-03-03T16:13:24.000Z","dependencies_parsed_at":"2024-01-16T09:54:31.854Z","dependency_job_id":"ea3c599b-96dd-406b-b36c-68cb4503cb64","html_url":"https://github.com/buildo/eslint-plugin-fp-ts","commit_stats":{"total_commits":137,"total_committers":9,"mean_commits":"15.222222222222221","dds":0.5036496350364963,"last_synced_commit":"4099f438b37aa8e8a8fafc343cd5d201f00e7c9f"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildo%2Feslint-plugin-fp-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildo%2Feslint-plugin-fp-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildo%2Feslint-plugin-fp-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildo%2Feslint-plugin-fp-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildo","download_url":"https://codeload.github.com/buildo/eslint-plugin-fp-ts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254226960,"owners_count":22035655,"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-07-31T19:01:47.833Z","updated_at":"2025-05-16T03:06:33.408Z","avatar_url":"https://github.com/buildo.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"![badge](https://concourse.our.buildo.io/api/v1/teams/buildo/pipelines/eslint-plugin-fp-ts/badge)\n![npm](https://img.shields.io/npm/dm/eslint-plugin-fp-ts)\n![npm](https://img.shields.io/npm/v/eslint-plugin-fp-ts)\n\n# eslint-plugin-fp-ts\n\nA collection of ESLint rules for [fp-ts](https://github.com/gcanti/fp-ts)\n\n## Installation\n\nAssuming [ESlint](https://github.com/eslint/eslint) is installed locally in your\nproject:\n\n```sh\n# npm\nnpm install --save-dev eslint-plugin-fp-ts\n\n# yarn\nyarn add --dev eslint-plugin-fp-ts\n```\n\nThen enable the plugin in your `.eslintrc` config\n\n```json\n{\n  \"plugins\": [\"fp-ts\"]\n}\n```\n\nand enable the rules you want, for example\n\n```json\n{\n  \"plugins\": [\"fp-ts\"],\n  \"rules\": {\n    \"fp-ts/no-lib-imports\": \"error\"\n  }\n}\n```\n\nIf you want to enable rules that require type information (see the table below),\nthen you will also need to add some extra info:\n\n```js\nmodule.exports = {\n  plugins: [\"fp-ts\"],\n  parserOptions: {\n    tsconfigRootDir: __dirname,\n    project: [\"./tsconfig.json\"],\n  },\n  rules: {\n    \"fp-ts/no-discarded-pure-expression\": \"error\",\n  },\n};\n```\n\nIf your project is a multi-package monorepo, you can follow the instructions\n[here](https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/MONOREPO.md).\n\n\u003e ⚠️ Note that you will need to make the ESLint config file a .js file, due to\n\u003e the need of setting `tsconfigRootDir` to `__dirname`. This is necessary to\n\u003e make both editor integrations and the CLI work with the correct path. More\n\u003e info here: https://github.com/typescript-eslint/typescript-eslint/issues/251\n\n## List of supported rules\n\n| Rule                                                                             | Description                                                                                | Fixable | Requires type-checking |\n| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | :-----: | :--------------------: |\n| [fp-ts/no-lib-imports](docs/rules/no-lib-imports.md)                             | Disallow imports from `fp-ts/lib/`                                                         |   🔧    |                        |\n| [fp-ts/no-pipeable](docs/rules/no-pipeable.md)                                   | Disallow imports from the `pipeable` module                                                |   🔧    |                        |\n| [fp-ts/no-module-imports](docs/rules/no-module-imports.md)                       | Disallow imports from fp-ts modules                                                        |   🔧    |                        |\n| [fp-ts/no-redundant-flow](docs/rules/no-redundant-flow.md)                       | Remove redundant uses of `flow`                                                            |   🔧    |                        |\n| [fp-ts/prefer-traverse](docs/rules/prefer-traverse.md)                           | Replace `map` + `sequence` with `traverse`                                                 |   💡    |                        |\n| [fp-ts/prefer-chain](docs/rules/prefer-chain.md)                                 | Replace `map` + `flatten` with `chain`                                                     |   💡    |                        |\n| [fp-ts/prefer-bimap](docs/rules/prefer-bimap.md)                                 | Replace `map` + `mapLeft` with `bimap`                                                     |   💡    |                        |\n| [fp-ts/no-discarded-pure-expression](docs/rules/no-discarded-pure-expression.md) | Disallow expressions returning pure data types (like `Task` or `IO`) in statement position |   💡    |           🦄           |\n\n### Fixable legend:\n\n🔧 = auto-fixable via `--fix` (or via the appropriate editor configuration)\n\n💡 = provides in-editor suggestions that need to be applied manually\n\n## Configurations\n\n### Recommended\n\nThe plugin defines a `recommended` configuration with some reasonable defaults.\n\nTo use it, add it to the `extends` clause of your `.eslintrc` file:\n\n```json\n{\n  \"extends\": [\"plugin:fp-ts/recommended\"]\n}\n```\n\nThe rules included in this configuration are:\n\n- [fp-ts/no-lib-imports](docs/rules/no-lib-imports.md)\n- [fp-ts/no-pipeable](docs/rules/no-pipeable.md)\n\n### Recommended requiring type-checking\n\nWe also provide a `recommended-requiring-type-checking` which includes\nrecommended rules which require type information.\n\nThis configuration needs to be included _in addition_ to the `recommended` one:\n\n```\n{\n  \"extends\": [\n    \"plugin:fp-ts/recommended\",\n    \"plugin:fp-ts/recommended-requiring-type-checking\"\n  ]\n}\n```\n\n\u003e 👉 You can read more about linting with type information, including\n\u003e performance considerations \n\u003e [here](https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md)\n\n### All\n\nThe plugin also defines an `all` configuration which includes every available\nrule.\n\nTo use it, add it to the `extends` clause of your `.eslintrc` file:\n\n```json\n{\n  \"extends\": [\"plugin:fp-ts/all\"]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildo%2Feslint-plugin-fp-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildo%2Feslint-plugin-fp-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildo%2Feslint-plugin-fp-ts/lists"}