{"name":"eslint-plugin-functional","version":"3.0.0","keywords":["eslint","eslint plugin","fp","functional","functional programming","immutability","immutable"],"author":{"name":"Jonas Kello"},"license":"MIT","_id":"eslint-plugin-functional@3.0.0","maintainers":[{"name":"jonaskello","email":"jonas.kello@gmail.com"},{"name":"rebeccastevens","email":"rebecca.stevens@outlook.co.nz"}],"contributors":[{"name":"Rebecca Stevens","email":"rebecca.stevens@outlook.co.nz"}],"homepage":"https://github.com/jonaskello/eslint-plugin-functional#readme","bugs":{"url":"https://github.com/jonaskello/eslint-plugin-functional/issues"},"dist":{"shasum":"a95117dc386889692d4efd152f090cf5d8f50f9a","tarball":"http://registry-npm.ywwl.com/eslint-plugin-functional/download/eslint-plugin-functional-3.0.0.tgz","fileCount":8,"integrity":"sha512-fweLCVf+disvOapl6iVQJbq6V8Fl8LPaw2MbvVAEYy3NxQZvdUyxUiUyymBT5wmBDGsQoZdzEXLNuT9nnm4sww==","signatures":[{"sig":"MEQCICoymhZhh0r77WSWJL9+hIKfiaw2TQ1/LiirCUcC9KrwAiBFUpn3uCNxwi4DfRx5gSRj6QtYXhjohoNHWE2Ks4GDHQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGc2LCRA9TVsSAnZWagAASz8QAKUwphMDzBuCRSGDKVpE\nZFMSZr1MXkvV0Hfw5NPNFi2Cphg85/zodzct+P75WsGNHU6xrlS9tuq3+kBx\nT4VxRyH5ytAyFaFBr4dgJqu6Ci1wdAZxa1R0F+e3P8bBMQV8Z6e4zAE9SbgY\n2Dk6zAc+0EygmGADmwthWe/RUtR5qksyfUKmLjH0Wx8fHFjUp7fFUl/2fzfg\nIsP13E3kYfLbtXHL0Vzi3VpI0uXDkTAUXFCFYWSHHzY/rQ1KUvlvG8153ZhY\n5BZt3RVTl7OH71REghnwarJre/PBWyw04PTjGWtm3in0DgIqftAd62PWW9a4\nu+GU8/oVCYmF3+QlMHs813K8VI3j579u79+8RVDnPkJ5l7kZp04Xh3b9EuLv\nraXjQG4+Qx9HUupByAAG4SiCrjcnZyTUCEJVrbK0JUlq/VgvIPW4l9b+Gr6q\n8Nw3Wwnq5m/JoUTd/WeaLR2WHIMJgwzAvQLta06ScX3pnn929zM3Z7PHvK9h\n1lRSavtOyu2r3nuOXWXHgL2jhdkntwW+GnA8S17W/iwmQCRdfEUFKqeMpdea\n0IDjaSDckrPYClL+ReSYXvHu9B1XrrmeAzsx+/9TquhPh/7joNnXqaITGp/f\ngdXrv+odzDxDkbMYlhIX7GobsjVo4rJXMK7+T4S9zpPUVIb+YQ6NA8QNqAe2\nBBq7\r\n=77Zq\r\n-----END PGP SIGNATURE-----\r\n","size":27744,"noattachment":false,"key":"/eslint-plugin-functional/-/eslint-plugin-functional-3.0.0.tgz"},"main":"lib/index.js","husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"engines":{"node":">=10.18.0"},"exports":{"import":"./lib/index.mjs","default":"./lib/index.js","require":"./lib/index.js"},"scripts":{"lint":"yarn eslint './{src,tests}/**/*.ts' --ext .ts -f visualstudio","test":"yarn jest --testPathIgnorePatterns _work.test","build":"yarn rimraf lib && yarn compile","verify":"yarn build && yarn lint && yarn build-tests && yarn test-compiled && rimraf build","compile":"yarn rollup -c","prelint":"yarn build && yarn link && yarn link 'eslint-plugin-functional'","test-work":"yarn jest tests/rules/_work.test.ts","preversion":"yarn verify","build-tests":"yarn rimraf build && yarn compile-tests","postversion":"yarn auto-changelog -p && git add CHANGELOG.md && git commit -m \"docs(changelog): update changelog for v$npm_package_version\" && git push --tags && yarn publish --new-version $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\"","compile-tests":"yarn tsc -p tsconfig.tests.json && cp ./tests/helpers/tsconfig.json ./build/tests/helpers/","test-compiled":"USE_COMPLIED=1 yarn test","report-coverage":"yarn codecov -f coverage/lcov.info"},"_npmUser":{"name":"rebeccastevens","email":"rebecca.stevens@outlook.co.nz"},"repository":{"url":"git+https://github.com/jonaskello/eslint-plugin-functional","type":"git"},"description":"ESLint rules to disable mutation and promote fp in TypeScript.","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2016 Jonas Kello\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","lint-staged":{"./{src,tests}/**/*.{ts}":"eslint","./{src,tests}/**/*.{ts,json}":["yarn prettier --write","git add"]},"dependencies":{"deepmerge":"^4.2.2","escape-string-regexp":"^2.0.0","array.prototype.flatmap":"^1.2.3","@typescript-eslint/experimental-utils":"^2.15.0"},"_hasShrinkwrap":false,"devDependencies":{"glob":"^7.1.6","jest":"^24.9.0","husky":"^4.0.6","dedent":"^0.7.0","eslint":"^6.8.0","rimraf":"^3.0.0","rollup":"^1.29.0","codecov":"^3.5.0","shelljs":"^0.8.3","ts-jest":"^24.3.0","prettier":"^1.19.1","typescript":"^3.7.4","@types/glob":"^7.1.1","@types/jest":"^24.0.15","@types/node":"^8.10.49","json-schema":"^0.2.5","lint-staged":"^9.5.0","babel-eslint":"^10.0.2","@types/dedent":"^0.7.0","@types/eslint":"^6.1.3","@types/estree":"^0.0.42","auto-changelog":"^1.16.2","eslint-plugin-jest":"^23.4.0","rollup-plugin-json":"^4.0.0","eslint-plugin-jsdoc":"^20.0.5","eslint-plugin-import":"^2.20.0","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","rollup-plugin-commonjs":"^10.1.0","@typescript-eslint/parser":"^2.3.1","rollup-plugin-typescript2":"^0.25.3","rollup-plugin-node-resolve":"^5.2.0","eslint-plugin-eslint-plugin":"^2.2.0","@typescript-eslint/eslint-plugin":"^2.3.1"},"peerDependencies":{"eslint":"^5.0.0 || ^6.0.0","typescript":">=3.4.1"},"peerDependenciesMeta":{"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-functional_3.0.0_1578749323223_0.9609408148726755","host":"s3://npm-registry-packages"},"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":1578749323383,"_cnpm_publish_time":1578749323383,"dist-tags":{"eslint-9-alpha":"7.0.0-alpha.12","latest":"10.0.1","next":"7.0.0-rc.1"}}