{"name":"eslint-plugin-functional","version":"9.0.2","keywords":["eslint","eslint plugin","fp","functional","functional programming","immutability","immutable"],"author":{"name":"Rebecca Stevens","email":"rebecca.stevens@outlook.co.nz"},"license":"MIT","_id":"eslint-plugin-functional@9.0.2","maintainers":[{"name":"jonaskello","email":"jonas.kello@gmail.com"},{"name":"rebeccastevens","email":"rebecca.stevens@outlook.co.nz"}],"contributors":[{"name":"Jonas Kello"}],"homepage":"https://github.com/eslint-functional/eslint-plugin-functional#readme","bugs":{"url":"https://github.com/eslint-functional/eslint-plugin-functional/issues"},"dist":{"shasum":"f7eba53624812dfccd42d6c94ef41bab97cb2b05","tarball":"http://registry-npm.ywwl.com/eslint-plugin-functional/download/eslint-plugin-functional-9.0.2.tgz","fileCount":5,"integrity":"sha512-N8kP9HX1CJ2HrufPHLzsKNJ81O1IB25jw2mxOc1H1z3CamEu8MYTn9dOo/FPfQwsqHZVuf7wyDCBcL8r8H7N0w==","signatures":[{"sig":"MEUCIEw2RlJ8MDYmD3ukSES1QjUqoK+9lGQwMrcaJAKV6rC9AiEAjIRuDkZysOwiivCJR3LgTS+u6ZsJ0JoGmGyOWaR19gw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":201946,"size":34300,"noattachment":false,"key":"/eslint-plugin-functional/-/eslint-plugin-functional-9.0.2.tgz"},"type":"module","engines":{"node":">=v18.18.0"},"exports":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"funding":[{"url":"https://ko-fi.com/rebeccastevens","type":"ko-fi"},{"url":"https://tidelift.com/funding/github/npm/eslint-plugin-functional","type":"tidelift"}],"gitHead":"5e6f36cad1c132212543a395c26f8e3158cad25e","scripts":{"lint":"eslint && pnpm run lint:md && pnpm lint:eslint-docs && pnpm run lint:spelling && pnpm run lint:knip && pnpm run lint:packages","test":"pnpm run test:js","build":"pnpm run build:node && pnpm run build:docs","verify":"pnpm run lint && pnpm run typecheck && pnpm run test:js-run","lint:js":"eslint \"**/*.?([cm])[jt]s?(x)\"","lint:md":"markdownlint-cli2","prepare":"husky","release":"semantic-release","test:js":"vitest --coverage","lint-fix":"pnpm run build && eslint --fix && pnpm run lint:md-fix && pnpm run lint:packages-fix","lint:knip":"knip","lint:yaml":"eslint \"**/*.y?(a)ml\"","test-work":"vitest","typecheck":"pnpm run typecheck:root && pnpm run typecheck:src","build:docs":"eslint-doc-generator","build:node":"rimraf lib && rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript --configImportAttributesKey with","lint:js-fix":"eslint \"**/*.?([cm])[jt]s?(x)\" --fix","lint:md-fix":"markdownlint-cli2 --fix","test:js-run":"vitest run --coverage","lint:md-full":"pnpm run lint:md && eslint \"**/*.md\"","lint:packages":"pnpm dedupe --check","lint:spelling":"cspell lint --no-progress --show-suggestions --show-context --dot \"**\" \".github/**/*\"","lint:yaml-fix":"eslint \"**/*.y?(a)ml\" --fix","typecheck:src":"tsc -p ./src/tsconfig.json --noEmit","typecheck:root":"tsc -p ./tsconfig.json --noEmit","lint:eslint-docs":"eslint-doc-generator --check","lint:md-full-fix":"pnpm run lint:md-fix && eslint \"**/*.md\" --fix","lint:packages-fix":"pnpm dedupe","lint:eslint-docs-fix":"pnpm build:docs"},"_npmUser":{"name":"rebeccastevens","email":"rebecca.stevens@outlook.co.nz"},"overrides":{"eslint-plugin-functional":"link:."},"repository":{"url":"git+https://github.com/eslint-functional/eslint-plugin-functional.git","type":"git"},"_npmVersion":"10.8.2","description":"ESLint rules to promote functional programming in TypeScript.","directories":{},"_nodeVersion":"20.19.1","dependencies":{"deepmerge-ts":"^7.1.5","ts-api-utils":"^2.0.1","is-immutable-type":"^5.0.1","escape-string-regexp":"^5.0.0","ts-declaration-location":"^1.0.6","@typescript-eslint/utils":"^8.26.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.10.0","devDependencies":{"tsx":"4.19.4","knip":"5.55.1","husky":"9.1.7","cspell":"9.0.2","dedent":"1.6.0","eslint":"9.25.1","rimraf":"6.0.1","rollup":"4.40.2","vitest":"3.1.2","prettier":"3.5.3","fast-glob":"3.3.3","tsc-files":"1.1.4","typescript":"5.8.3","@types/node":"18.19.100","lint-staged":"16.1.0","@eslint/compat":"1.2.9","eslint-plugin-n":"17.18.0","semantic-release":"24.2.5","eslint-plugin-yml":"1.18.0","markdownlint-cli2":"0.18.0","yaml-eslint-parser":"1.3.0","@vitest/coverage-v8":"3.1.2","eslint-plugin-jsdoc":"50.6.14","eslint-plugin-jsonc":"2.20.0","jsonc-eslint-parser":"2.4.0","vite-tsconfig-paths":"5.1.4","@babel/eslint-parser":"7.27.1","eslint-doc-generator":"2.1.2","eslint-plugin-format":"1.0.1","eslint-plugin-regexp":"2.7.0","@semantic-release/git":"10.0.1","@semantic-release/npm":"12.0.1","@vitest/eslint-plugin":"1.1.44","eslint-plugin-promise":"7.2.1","eslint-plugin-sonarjs":"3.0.2","eslint-plugin-unicorn":"59.0.1","@rollup/plugin-replace":"6.0.2","eslint-config-prettier":"10.1.5","eslint-plugin-import-x":"4.11.1","eslint-plugin-markdown":"5.1.0","eslint-plugin-prettier":"5.4.0","rollup-plugin-deassert":"1.3.0","eslint-merge-processors":"2.0.0","@semantic-release/github":"11.0.3","@stylistic/eslint-plugin":"4.4.0","eslint-flat-config-utils":"2.0.1","eslint-plugin-functional":"link:.","@rollup/plugin-typescript":"12.1.2","@typescript-eslint/parser":"8.31.1","eslint-vitest-rule-tester":"2.2.0","@semantic-release/changelog":"6.0.3","eslint-plugin-eslint-plugin":"6.4.0","eslint-plugin-no-only-tests":"3.3.0","eslint-plugin-optimize-regex":"1.2.1","@cspell/dict-cryptocurrencies":"5.0.4","@rebeccastevens/eslint-config":"3.7.1","eslint-plugin-eslint-comments":"3.2.0","semantic-release-replace-plugin":"1.2.7","@typescript-eslint/eslint-plugin":"8.31.1","@semantic-release/commit-analyzer":"13.0.1","eslint-import-resolver-typescript":"4.3.4","rollup-plugin-dts-bundle-generator-2":"2.0.0","@semantic-release/release-notes-generator":"14.0.3"},"peerDependencies":{"eslint":"^9.0.0","typescript":">=4.7.4"},"peerDependenciesMeta":{"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-functional_9.0.2_1748860397316_0.4845129152962597","host":"s3://npm-registry-packages-npm-production"},"readme":"<div align=\"center\">\n\n![eslint-logo](docs/assets/eslint-functional-logo.png?sanitize=true)\n\n# eslint-plugin-functional\n\n[![npm version](https://img.shields.io/npm/v/eslint-plugin-functional.svg?style=flat)](https://www.npmjs.com/package/eslint-plugin-functional)\n[![Release](https://github.com/eslint-functional/eslint-plugin-functional/actions/workflows/release.yml/badge.svg)](https://github.com/eslint-functional/eslint-plugin-functional/actions/workflows/release.yml)\n[![Coverage Status](https://codecov.io/gh/eslint-functional/eslint-plugin-functional/branch/main/graph/badge.svg)](https://codecov.io/gh/eslint-functional/eslint-plugin-functional)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat)](https://github.com/semantic-release/semantic-release)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat)](https://github.com/prettier/prettier)\n[![MIT license](https://img.shields.io/github/license/eslint-functional/eslint-plugin-functional.svg?style=flat)](https://opensource.org/licenses/MIT)\n[![GitHub Discussions](https://img.shields.io/github/discussions/eslint-functional/eslint-plugin-functional)](https://github.com/eslint-functional/eslint-plugin-functional/discussions)\n\nAn [ESLint](http://eslint.org) plugin to disable mutation and promote functional programming in JavaScript and TypeScript.\n\n</div>\n\n## Donate\n\n[Any donations would be much appreciated](./DONATIONS.md). 😄\n\n### Enterprise Users\n\n`eslint-plugin-functional` is available as part of the Tidelift Subscription.\n\nTidelift is working with the maintainers of `eslint-plugin-functional` and a growing network of open source maintainers\nto ensure your open source software supply chain meets enterprise standards now and into the future.\n[Learn more.](https://tidelift.com/subscription/pkg/npm-eslint-plugin-functional?utm_source=npm-eslint-plugin-functional&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n\n## Getting Started\n\n[See our getting started guide](./GETTING_STARTED.md).\n\n## Rulesets\n\nThe following rulesets are made available by this plugin.\n\nPresets:\n\n- **Strict** (`configs.strict`)\\\n  Enforce recommended rules designed to strictly enforce functional programming.\n\n- **Recommended** (`configs.recommended`)\\\n  Has the same goal as the `strict` preset but a little more lenient, allowing for functional-like coding styles and\n  nicer integration with non-functional 3rd-party libraries.\n\n- **Lite** (`configs.lite`)\\\n  Good if you're new to functional programming or are converting a large codebase.\n\nCategorized:\n\n- **Currying** (`configs.currying`)\\\n  JavaScript functions support syntax that is not compatible with curried functions. To enforce currying, this syntax\n  should be prevented.\n\n- **No Exceptions** (`configs.noExceptions`)\\\n  Functional programming style does not use run-time exceptions. Instead expressions produces values to indicate errors.\n\n- **No Mutations** (`configs.noMutations`)\\\n  Prevent mutating any data as that's not functional\n\n- **No Other Paradigms** (`configs.noOtherParadigms`)\\\n  JavaScript is multi-paradigm, allowing not only functional, but object-oriented as well as other programming styles.\n  To promote a functional style, prevent the use of other paradigm styles.\n\n- **No Statements** (`configs.noStatements`)\\\n  In functional programming everything is an expression that produces a value.\n  JavaScript has a lot of syntax that is just statements that does not produce a value.\n  That syntax has to be prevented to promote a functional style.\n\n- **Stylistic** (`configs.stylistic`)\\\n  Enforce code styles that can be considered to be more functional.\n\nOther:\n\n- **All** (`configs.all`)\\\n  Enables all rules defined in this plugin.\n\n- **Off** (`configs.off`)\\\n  Disable all rules defined in this plugin.\n\n- **Disable Type Checked** (`configs.disableTypeChecked`)\\\n  Disable all rules that require type information.\n\n- **External Vanilla Recommended** (`configs.externalVanillaRecommended`)\\\n  Configures recommended [vanilla ESLint](https://www.npmjs.com/package/eslint) rules.\n\n- **External TypeScript Recommended** (`configs.externalTypeScriptRecommended`)\\\n  Configures recommended [TypeScript ESLint](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) rules.\n  Enabling this ruleset will also enable the vanilla one.\n\nThe [below section](#rules) gives details on which rules are enabled by each ruleset.\n\n## Rules\n\n<!-- markdownlint-disable -->\n<!-- begin auto-generated rules list -->\n\n💼 Configurations enabled in.\\\n⚠️ Configurations set to warn in.\\\n🚫 Configurations disabled in.\\\n![badge-currying](https://img.shields.io/badge/-currying-red.svg) Set in the `currying` configuration.\\\n☑️ Set in the `lite` configuration.\\\n![badge-noExceptions](https://img.shields.io/badge/-noExceptions-blue.svg) Set in the `noExceptions` configuration.\\\n![badge-noMutations](https://img.shields.io/badge/-noMutations-orange.svg) Set in the `noMutations` configuration.\\\n![badge-noOtherParadigms](https://img.shields.io/badge/-noOtherParadigms-yellow.svg) Set in the `noOtherParadigms` configuration.\\\n![badge-noStatements](https://img.shields.io/badge/-noStatements-purple.svg) Set in the `noStatements` configuration.\\\n✅ Set in the `recommended` configuration.\\\n🔒 Set in the `strict` configuration.\\\n🎨 Set in the `stylistic` configuration.\\\n🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\\\n💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\\\n💭 Requires [type information](https://typescript-eslint.io/linting/typed-linting).\\\n❌ Deprecated.\n\n### Currying\n\n| Name                                                         | Description                    | 💼                                                                         | ⚠️  | 🚫  | 🔧  | 💡  | 💭  | ❌  |\n| :----------------------------------------------------------- | :----------------------------- | :------------------------------------------------------------------------- | :-- | :-- | :-- | :-- | :-- | :-- |\n| [functional-parameters](docs/rules/functional-parameters.md) | Enforce functional parameters. | ![badge-currying](https://img.shields.io/badge/-currying-red.svg) ☑️ ✅ 🔒 |     |     |     |     | 💭  |     |\n\n### No Exceptions\n\n| Name                                                     | Description                                            | 💼                                                                                  | ⚠️  | 🚫    | 🔧  | 💡  | 💭  | ❌  |\n| :------------------------------------------------------- | :----------------------------------------------------- | :---------------------------------------------------------------------------------- | :-- | :---- | :-- | :-- | :-- | :-- |\n| [no-promise-reject](docs/rules/no-promise-reject.md)     | Disallow rejecting promises.                           |                                                                                     |     |       |     |     |     |     |\n| [no-throw-statements](docs/rules/no-throw-statements.md) | Disallow throwing exceptions.                          | ☑️ ![badge-noExceptions](https://img.shields.io/badge/-noExceptions-blue.svg) ✅ 🔒 |     |       |     |     | 💭  |     |\n| [no-try-statements](docs/rules/no-try-statements.md)     | Disallow try-catch[-finally] and try-finally patterns. | ![badge-noExceptions](https://img.shields.io/badge/-noExceptions-blue.svg) 🔒       |     | ☑️ ✅ |     |     |     |     |\n\n### No Mutations\n\n| Name                                                                         | Description                                                     | 💼                                                                                  | ⚠️  | 🚫  | 🔧  | 💡  | 💭  | ❌  |\n| :--------------------------------------------------------------------------- | :-------------------------------------------------------------- | :---------------------------------------------------------------------------------- | :-- | :-- | :-- | :-- | :-- | :-- |\n| [immutable-data](docs/rules/immutable-data.md)                               | Enforce treating data as immutable.                             | ☑️ ![badge-noMutations](https://img.shields.io/badge/-noMutations-orange.svg) ✅ 🔒 |     |     |     |     | 💭  |     |\n| [no-let](docs/rules/no-let.md)                                               | Disallow mutable variables.                                     | ☑️ ![badge-noMutations](https://img.shields.io/badge/-noMutations-orange.svg) ✅ 🔒 |     |     |     |     |     |     |\n| [prefer-immutable-types](docs/rules/prefer-immutable-types.md)               | Require function parameters to be typed as certain immutability | ☑️ ![badge-noMutations](https://img.shields.io/badge/-noMutations-orange.svg) ✅ 🔒 |     |     | 🔧  | 💡  | 💭  |     |\n| [prefer-readonly-type](docs/rules/prefer-readonly-type.md)                   | Prefer readonly types over mutable types.                       |                                                                                     |     |     | 🔧  |     | 💭  | ❌  |\n| [type-declaration-immutability](docs/rules/type-declaration-immutability.md) | Enforce the immutability of types based on patterns.            | ☑️ ![badge-noMutations](https://img.shields.io/badge/-noMutations-orange.svg) ✅ 🔒 |     |     | 🔧  | 💡  | 💭  |     |\n\n### No Other Paradigms\n\n| Name                                                       | Description                                                               | 💼                                                                                            | ⚠️  | 🚫    | 🔧  | 💡  | 💭  | ❌  |\n| :--------------------------------------------------------- | :------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------- | :-- | :---- | :-- | :-- | :-- | :-- |\n| [no-class-inheritance](docs/rules/no-class-inheritance.md) | Disallow inheritance in classes.                                          | ☑️ ![badge-noOtherParadigms](https://img.shields.io/badge/-noOtherParadigms-yellow.svg) ✅ 🔒 |     |       |     |     |     |     |\n| [no-classes](docs/rules/no-classes.md)                     | Disallow classes.                                                         | ![badge-noOtherParadigms](https://img.shields.io/badge/-noOtherParadigms-yellow.svg) ✅ 🔒    |     | ☑️    |     |     |     |     |\n| [no-mixed-types](docs/rules/no-mixed-types.md)             | Restrict types so that only members of the same kind are allowed in them. | ☑️ ![badge-noOtherParadigms](https://img.shields.io/badge/-noOtherParadigms-yellow.svg) ✅ 🔒 |     |       |     |     | 💭  |     |\n| [no-this-expressions](docs/rules/no-this-expressions.md)   | Disallow this access.                                                     | ![badge-noOtherParadigms](https://img.shields.io/badge/-noOtherParadigms-yellow.svg) 🔒       |     | ☑️ ✅ |     |     |     |     |\n\n### No Statements\n\n| Name                                                                 | Description                                    | 💼                                                                                    | ⚠️  | 🚫  | 🔧  | 💡  | 💭  | ❌  |\n| :------------------------------------------------------------------- | :--------------------------------------------- | :------------------------------------------------------------------------------------ | :-- | :-- | :-- | :-- | :-- | :-- |\n| [no-conditional-statements](docs/rules/no-conditional-statements.md) | Disallow conditional statements.               | ![badge-noStatements](https://img.shields.io/badge/-noStatements-purple.svg) ✅ 🔒    |     | ☑️  |     |     | 💭  |     |\n| [no-expression-statements](docs/rules/no-expression-statements.md)   | Disallow expression statements.                | ![badge-noStatements](https://img.shields.io/badge/-noStatements-purple.svg) ✅ 🔒    |     | ☑️  |     |     | 💭  |     |\n| [no-loop-statements](docs/rules/no-loop-statements.md)               | Disallow imperative loops.                     | ☑️ ![badge-noStatements](https://img.shields.io/badge/-noStatements-purple.svg) ✅ 🔒 |     |     |     |     |     |     |\n| [no-return-void](docs/rules/no-return-void.md)                       | Disallow functions that don't return anything. | ☑️ ![badge-noStatements](https://img.shields.io/badge/-noStatements-purple.svg) ✅ 🔒 |     |     |     |     | 💭  |     |\n\n### Stylistic\n\n| Name                                                                   | Description                                                            | 💼  | ⚠️  | 🚫  | 🔧  | 💡  | 💭  | ❌  |\n| :--------------------------------------------------------------------- | :--------------------------------------------------------------------- | :-- | :-- | :-- | :-- | :-- | :-- | :-- |\n| [prefer-property-signatures](docs/rules/prefer-property-signatures.md) | Prefer property signatures over method signatures.                     | 🎨  |     |     |     |     | 💭  |     |\n| [prefer-tacit](docs/rules/prefer-tacit.md)                             | Replaces `x => f(x)` with just `f`.                                    |     | 🎨  |     |     | 💡  | 💭  |     |\n| [readonly-type](docs/rules/readonly-type.md)                           | Require consistently using either `readonly` keywords or `Readonly<T>` | 🎨  |     |     | 🔧  |     | 💭  |     |\n\n<!-- end auto-generated rules list -->\n<!-- markdownlint-restore -->\n\n## External Recommended Rules\n\nIn addition to the above rules, there are a few other rules we recommended.\n\nThese rules are what are included in the _external recommended_ rulesets.\n\n### Vanilla Rules\n\n- [no-var](https://eslint.org/docs/rules/no-var)\\\n  Without this rule, it is still possible to create mutable `var` variables.\n\n- [no-param-reassign](https://eslint.org/docs/rules/no-param-reassign)\\\n  Don't allow function parameters to be reassigned, they should be treated as constants.\n\n- [prefer-const](https://eslint.org/docs/rules/prefer-const)\\\n  This rule provides a helpful fixer when converting from an imperative code style to a functional one.\n\n### TypeScript Rules\n\n- [@typescript-eslint/prefer-readonly](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-readonly.mdx)\\\n  This rule is helpful when working with classes.\n\n- [@typescript-eslint/switch-exhaustiveness-check](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.mdx)\\\n  Although our [no-conditional-statements](./docs/rules/no-conditional-statements.md) rule also performs this check,\n  this rule has a fixer that will implement the unimplemented cases which can be useful.\n\n## Contributing\n\n[See our contributing guide](./CONTRIBUTING.md).\n\n## Prior work\n\nThis project started as a port of [tslint-immutable](https://github.com/jonaskello/tslint-immutable)\nwhich was originally inspired by [eslint-plugin-immutable](https://github.com/jhusain/eslint-plugin-immutable).\n","publish_time":1748860397472,"_cnpm_publish_time":1748860397472,"dist-tags":{"eslint-9-alpha":"7.0.0-alpha.12","latest":"10.0.1","next":"7.0.0-rc.1"}}