Socket
Socket
Sign inDemoInstall

eslint-plugin-functional

Package Overview
Dependencies
Maintainers
2
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-functional - npm Package Compare versions

Comparing version 5.0.0-beta.16 to 5.0.0

73

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
# [5.0.0](https://github.com/eslint-functional/eslint-plugin-functional/compare/v4.4.1...v5.0.0) (2023-01-29)
### Bug Fixes
* drop dependency on tsutils ([7a63d89](https://github.com/eslint-functional/eslint-plugin-functional/commit/7a63d8971b16e83fa6420776955105cc5325a428))
* fix meta data and improve doc generation ([1f50625](https://github.com/eslint-functional/eslint-plugin-functional/commit/1f506259dd5052447d8c23f583dbd2ca255114d3))
* **no-mixed-types:** add support for TypeLiteral inside `Readonly<>` ([1da622d](https://github.com/eslint-functional/eslint-plugin-functional/commit/1da622d43dc6c0c48213931ddd447895971d8d8a)), closes [#500](https://github.com/eslint-functional/eslint-plugin-functional/issues/500)
* **prefer-immutable-types:** fix `string[]` to `readonly string[]` ([a6a27ff](https://github.com/eslint-functional/eslint-plugin-functional/commit/a6a27ffa41a40d417d1cdaca7100686fd94bad2e))
* **prefer-immutable-types:** improve the fixer ([4bba113](https://github.com/eslint-functional/eslint-plugin-functional/commit/4bba113be8ad20259147cab81e0ab3bccc79c6cd))
* **prefer-tacit:** use suggestions instead of a fixer and improve how that suggestion works ([8473743](https://github.com/eslint-functional/eslint-plugin-functional/commit/8473743446b10bccc7bf175f629fb05fab979e40))
* **type-declaration-immutability:** don't strip whitespace formatting from node text ([8dcaa4d](https://github.com/eslint-functional/eslint-plugin-functional/commit/8dcaa4d92ea6cd0424730b68da7164b49f5b82d4))
### Build System
* bump minimum supported version of node to 16.10 ([23b45d2](https://github.com/eslint-functional/eslint-plugin-functional/commit/23b45d25b252b1b0337c57ef671ae231a17f38d9))
* bump minimum supported version of TypeScript to 4.0.2 ([405102b](https://github.com/eslint-functional/eslint-plugin-functional/commit/405102be6379e7f30c8f3f0e28a43359e65a27e9))
### Features
* add new strict ruleset and reduce strictness of the recommended ruleset ([26424e0](https://github.com/eslint-functional/eslint-plugin-functional/commit/26424e03b1cdeba844893d219e7f950934386b72))
* **functional-parameters:** add option to ignore lambda function expressions ([044e54b](https://github.com/eslint-functional/eslint-plugin-functional/commit/044e54ba646a3f6001a16c3e7b19299efaf49eab))
* **no-classes:** rename rule from `no-class` ([76a8e2d](https://github.com/eslint-functional/eslint-plugin-functional/commit/76a8e2d28e32cfcd5a6477f8552b5fb43442a79d))
* **no-conditional-statements:** rename rule from `no-conditional-statement` ([82b21fa](https://github.com/eslint-functional/eslint-plugin-functional/commit/82b21fa954ec8ead473bbb9bc10273d3cc927e40))
* **no-expression-statements:** rename rule from `no-expression-statement` ([d0f9e98](https://github.com/eslint-functional/eslint-plugin-functional/commit/d0f9e98f451b881a1df69e92ce78abf18f2c76f6))
* **no-loop-statements:** rename rule from `no-loop-statement` ([683209d](https://github.com/eslint-functional/eslint-plugin-functional/commit/683209dd326b6405ecdcbe552aa271788c1a78af))
* **no-method-signature:** rename to `prefer-property-signatures` & move it to `stylistic` ruleset ([da2259f](https://github.com/eslint-functional/eslint-plugin-functional/commit/da2259f2f592b27af9d157e82160c857621750ca))
* **no-mixed-types:** rename rule from `no-mixed-type` ([392f9e8](https://github.com/eslint-functional/eslint-plugin-functional/commit/392f9e8cf10ec2d09222e65f4136cb3480fcadfd))
* **no-this-expression:** remove `no-this-expression` from recommended and lite rulesets ([bbd798b](https://github.com/eslint-functional/eslint-plugin-functional/commit/bbd798b484c17fdb32d45476c88e141402e1377e))
* **no-this-expressions:** rename rule from `no-this-expression` ([10c3bb6](https://github.com/eslint-functional/eslint-plugin-functional/commit/10c3bb6addc9e741296db43f1d464bf6483142c7))
* **no-throw-statements:** rename rule from `no-throw-statement` ([4be92c8](https://github.com/eslint-functional/eslint-plugin-functional/commit/4be92c8c2a485d870704379219f46e7fdb572ca8))
* **no-try-statements:** rename rule from `no-try-statement` ([e88828a](https://github.com/eslint-functional/eslint-plugin-functional/commit/e88828a9755018d7ab1c79a7b33d6cce1912f1c4))
* **prefer-immutable-types:** add fixer for class properties ([5e047c2](https://github.com/eslint-functional/eslint-plugin-functional/commit/5e047c2825d03d57ee1472846ff260831f685173))
* **prefer-immutable-types:** add support for a fixer ([195ee1a](https://github.com/eslint-functional/eslint-plugin-functional/commit/195ee1afcb3459a2ba8ae9e0a3ca9629da8c8c47))
* **prefer-immutable-types:** create rule ([2552d55](https://github.com/eslint-functional/eslint-plugin-functional/commit/2552d554f87c22031471a75d013d5cb3b84e2e40))
* **prefer-immutable-types:** improve ignore options ([8a35e52](https://github.com/eslint-functional/eslint-plugin-functional/commit/8a35e52684cee50d7269cb9442b835f548c3c665))
* **prefer-property-signatures:** rename `ignoreIfReadonly` to `ignoreIfReadonlyWrapped` ([86f354b](https://github.com/eslint-functional/eslint-plugin-functional/commit/86f354badf6dee2359211e1e67b0caf8c1da5430))
* **prefer-readonly-type:** deprecated this rule ([82816a0](https://github.com/eslint-functional/eslint-plugin-functional/commit/82816a03f8af397c0e2de619e55515a504ff2df8))
* **readonly-type:** create rule ([64af937](https://github.com/eslint-functional/eslint-plugin-functional/commit/64af93713e7e5b46f902e5032f13b4e3bf5a8943))
* remove `@typescript-eslint/prefer-readonly-parameter-types` from `external-recommended` ([72aa204](https://github.com/eslint-functional/eslint-plugin-functional/commit/72aa2049413d22559b3f90c479baa66ab3312003))
* rename many of the options ([b47e983](https://github.com/eslint-functional/eslint-plugin-functional/commit/b47e983b822842d1f46824a1e8c98893d45e8cb8))
* rename ruleset `no-object-orientation` to `no-other-paradigms` ([7ec10c6](https://github.com/eslint-functional/eslint-plugin-functional/commit/7ec10c65d1c740697ecc7ca1cf5a9b7f48ed69e2))
* split `external-recommended` rulesets into vanilla and typescript variants ([1e7f77a](https://github.com/eslint-functional/eslint-plugin-functional/commit/1e7f77acb699033d17a9b20cbd9d11e5b85fb5b8))
* **type-declaration-immutability:** add fixer support ([2189397](https://github.com/eslint-functional/eslint-plugin-functional/commit/21893975f899d7df7f23b98aeadab1f56e5a6d29))
* **type-declaration-immutability:** create rule ([941e774](https://github.com/eslint-functional/eslint-plugin-functional/commit/941e774f11ed7473167e1d37020f17e6755e6a7b))
* update ruleset configurations ([c195d8e](https://github.com/eslint-functional/eslint-plugin-functional/commit/c195d8e94886b2250b6ccdaa8849445301814565))
### BREAKING CHANGES
* rename many of the options
* **no-try-statements:** rename rule from `no-try-statement`
* **no-throw-statements:** rename rule from `no-throw-statement`
* **no-this-expressions:** rename rule from `no-this-expression`
* **no-mixed-types:** rename rule from `no-mixed-type`
* **no-loop-statements:** rename rule from `no-loop-statement`
* **no-expression-statements:** rename rule from `no-expression-statement`
* **no-conditional-statements:** rename rule from `no-conditional-statement`
* **no-classes:** rename rule from `no-class`
* **no-this-expression:** remove `no-this-expression` from recommended and lite rulesets
* **prefer-property-signatures:** rename `ignoreIfReadonly` to `ignoreIfReadonlyWrapped` and set it to `false`
by default
* rename ruleset `no-object-orientation` to `no-other-paradigms`
* add new strict ruleset and reduce strictness of the recommended ruleset
* update ruleset configurations
* split `external-recommended` rulesets into vanilla and typescript variants
* remove `@typescript-eslint/prefer-readonly-parameter-types` from `external-recommended`
* **no-method-signature:** rename to `prefer-property-signatures` & move it to `stylistic` ruleset
* bump minimum supported version of TypeScript to 4.0.2
* bump minimum supported version of node to 16.10
## [4.4.1](https://github.com/eslint-functional/eslint-plugin-functional/compare/v4.4.0...v4.4.1) (2022-10-03)

@@ -5,0 +78,0 @@

153

package.json
{
"name": "eslint-plugin-functional",
"version": "v5.0.0-beta.16",
"version": "5.0.0",
"description": "ESLint rules to disable mutation and promote fp in TypeScript.",

@@ -22,10 +22,16 @@ "keywords": [

},
"license": "MIT",
"author": "Jonas Kello",
"contributors": [
"funding": [
{
"name": "Rebecca Stevens",
"email": "rebecca.stevens@outlook.co.nz"
"type": "ko-fi",
"url": "https://ko-fi.com/rebeccastevens"
}
],
"license": "MIT",
"author": {
"name": "Rebecca Stevens",
"email": "rebecca.stevens@outlook.co.nz"
},
"contributors": [
"Jonas Kello"
],
"exports": {

@@ -45,13 +51,13 @@ "default": "./lib/index.js",

"scripts": {
"build": "rimraf lib && yarn compile",
"build": "rimraf lib && yarn compile && yarn build:docs",
"build-tests": "rimraf build && yarn compile-tests",
"check-format": "prettier --list-different \"./**/*.{md,ts}\"",
"check-spelling": "cspell --config=.cspell.json \"**/*.{md,ts}\"",
"build:docs": "eslint-doc-generator",
"compile": "rollup -c",
"compile-tests": "ts-node -P scripts/tsconfig.json scripts/compile-tests.mts",
"cz": "git-cz",
"format": "prettier --write \"./**/*.{md,ts}\"",
"lint": "yarn build && yarn lint-js && yarn lint-md",
"lint-js": "eslint .",
"lint-md": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore",
"lint": "yarn build && yarn lint:js && yarn lint:md && yarn lint:eslint-docs && yarn lint:spelling",
"lint:eslint-docs": "eslint-doc-generator --check",
"lint:js": "eslint .",
"lint:md": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore",
"lint:spelling": "cspell --config=.cspell.json \"**/*.{md,ts}\"",
"prepare": "yarn husky install",

@@ -74,61 +80,64 @@ "test": "nyc ava",

"devDependencies": {
"@ava/typescript": "^3.0.1",
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@ava/typescript": "3.0.1",
"@commitlint/cli": "17.4.2",
"@commitlint/config-conventional": "17.4.2",
"@cspell/dict-cryptocurrencies": "3.0.1",
"@istanbuljs/nyc-config-typescript": "1.0.2",
"@rebeccastevens/eslint-config": "1.4.6",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-typescript": "^11.0.0",
"@types/dedent": "^0.7.0",
"@types/eslint": "^8.4.10",
"@types/estree": "^1.0.0",
"@types/node": "^16.10.0",
"@types/rollup-plugin-auto-external": "^2.0.2",
"@types/semver": "^7.3.13",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"ava": "^5.1.1",
"babel-eslint": "^10.1.0",
"chalk": "^4.1.2",
"codecov": "^3.8.2",
"commitizen": "^4.3.0",
"conventional-commit-types": "^3.0.0",
"cross-env": "^7.0.3",
"cspell": "^6.19.2",
"dedent": "^0.7.0",
"eslint": "^8.32.0",
"eslint-ava-rule-tester": "^4.0.0",
"eslint-config-prettier": "^8.6.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-ava": "^14.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-eslint-plugin": "^5.0.8",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^39.6.8",
"eslint-plugin-markdown": "^3.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-optimize-regex": "^1.2.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-sonarjs": "^0.18.0",
"eslint-plugin-unicorn": "^45.0.2",
"espree": "^9.4.1",
"husky": "^8.0.3",
"json-schema": "^0.4.0",
"jsonc-parser": "^3.2.0",
"lint-staged": "^13.1.0",
"markdownlint-cli": "^0.33.0",
"nyc": "^15.1.0",
"prettier": "^2.8.3",
"rimraf": "^4.1.2",
"rollup": "^3.10.1",
"rollup-plugin-auto-external": "^2.0.0",
"ts-node": "^10.9.1",
"tsc-prog": "^2.2.1",
"tsconfig-paths": "^4.1.2",
"tslib": "^2.4.1",
"typescript": "^4.9.4",
"word-wrap": "^1.2.3"
"@rollup/plugin-commonjs": "24.0.1",
"@rollup/plugin-json": "6.0.0",
"@rollup/plugin-node-resolve": "15.0.1",
"@rollup/plugin-typescript": "11.0.0",
"@types/dedent": "0.7.0",
"@types/eslint": "8.4.10",
"@types/estree": "1.0.0",
"@types/node": "16.10.0",
"@types/rollup-plugin-auto-external": "2.0.2",
"@types/semver": "7.3.13",
"@typescript-eslint/eslint-plugin": "5.49.0",
"@typescript-eslint/parser": "5.49.0",
"ava": "5.1.1",
"babel-eslint": "10.1.0",
"chalk": "4.1.2",
"codecov": "3.8.2",
"commitizen": "4.3.0",
"conventional-commit-types": "3.0.0",
"cross-env": "7.0.3",
"cspell": "6.19.2",
"dedent": "0.7.0",
"eslint": "8.32.0",
"eslint-ava-rule-tester": "4.0.0",
"eslint-config-prettier": "8.6.0",
"eslint-doc-generator": "1.4.2",
"eslint-import-resolver-typescript": "3.5.3",
"eslint-plugin-ava": "14.0.0",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-eslint-plugin": "5.0.8",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsdoc": "39.6.9",
"eslint-plugin-markdown": "3.0.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-optimize-regex": "1.2.1",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-sonarjs": "0.18.0",
"eslint-plugin-unicorn": "45.0.2",
"espree": "9.4.1",
"husky": "8.0.3",
"json-schema": "0.4.0",
"jsonc-parser": "3.2.0",
"lint-staged": "13.1.0",
"markdownlint-cli": "0.33.0",
"nyc": "15.1.0",
"prettier": "2.8.3",
"prettier-plugin-packagejson": "2.4.0",
"rimraf": "4.1.2",
"rollup": "3.11.0",
"rollup-plugin-auto-external": "2.0.0",
"ts-node": "10.9.1",
"tsc-prog": "2.2.1",
"tsconfig-paths": "4.1.2",
"tslib": "2.5.0",
"typescript": "4.9.4",
"word-wrap": "1.2.3"
},

@@ -144,3 +153,3 @@ "peerDependencies": {

},
"packageManager": "yarn@3.2.4",
"packageManager": "yarn@3.3.1",
"engines": {

@@ -147,0 +156,0 @@ "node": ">=16.10.0"

@@ -19,2 +19,10 @@ <div align="center">

## Donate
[Any donations would be much appreciated](./DONATIONS.md). πŸ˜„
## Getting Started
[See our getting started guide](./GETTING_STARTED.md).
## Rulesets

@@ -73,69 +81,73 @@

### No Mutations Rules
<!-- begin auto-generated rules list -->
| Name | Description | <span title="No Mutations">:fleur_de_lis:</span> | <span title="Strict">:speak_no_evil:</span> | <span title="Recommended">:see_no_evil:</span> | <span title="Lite">:hear_no_evil:</span> | :wrench: | :blue_heart: |
| -------------------------------------------------------------------------------- | ---------------------------------------------- | :----------------------------------------------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------: | :------: | :---------------: |
| [`immutable-data`](./docs/rules/immutable-data.md) | Disallow mutating objects and arrays | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :green_circle: | | :blue_heart: |
| [`no-let`](./docs/rules/no-let.md) | Disallow mutable variables | :heavy_check_mark: | :heavy_check_mark: | :green_circle: | :green_circle: | | |
| [`prefer-immutable-types`](./docs/rules/prefer-immutable-types.md) | Require types of data to be immutable | :heavy_check_mark: | :heavy_check_mark: | :green_circle: | :green_circle: | :wrench: | :thought_balloon: |
| [`type-declaration-immutability`](./docs/rules/type-declaration-immutability.md) | Enforce type alias immutability using patterns | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :wrench: | :thought_balloon: |
πŸ’Ό Configurations enabled in.\
⚠️ Configurations set to warn in.\
🚫 Configurations disabled in.\
β˜‘οΈ Set in the `lite` configuration.\
βœ… Set in the `recommended` configuration.\
πŸ”’ Set in the `strict` configuration.\
🎨 Set in the `stylistic` configuration.\
πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).\
❌ Deprecated.
### No Other Paradigms Rules
### Currying
| Name | Description | <span title="No Other Paradigms">:fleur_de_lis:</span> | <span title="Strict">:speak_no_evil:</span> | <span title="Recommended">:see_no_evil:</span> | <span title="Lite">:hear_no_evil:</span> | :wrench: | :blue_heart: |
| ------------------------------------------------------------ | ------------------------------------------------------------------ | :----------------------------------------------------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------: | :------: | :---------------: |
| [`no-classes`](./docs/rules/no-classes.md) | Disallow classes | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | |
| [`no-mixed-types`](./docs/rules/no-mixed-types.md) | Disallow types that contain both callable and non-callable members | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :thought_balloon: |
| [`no-this-expressions`](./docs/rules/no-this-expressions.md) | Disallow `this` access | :heavy_check_mark: | :heavy_check_mark: | | | | |
| Name | Description | πŸ’Ό | ⚠️ | 🚫 | πŸ”§ | πŸ’‘ | ❌ |
| :----------------------------------------------------------- | :----------------------------- | :--------------------------- | :-- | :-- | :-- | :-- | :-- |
| [functional-parameters](docs/rules/functional-parameters.md) | Enforce functional parameters. | ![badge-currying][] β˜‘οΈ βœ… πŸ”’ | | | | | |
### No Statements Rules
### No Exceptions
| Name | Description | <span title="No Statements">:fleur_de_lis:</span> | <span title="Strict">:speak_no_evil:</span> | <span title="Recommended">:see_no_evil:</span> | <span title="Lite">:hear_no_evil:</span> | :wrench: | :blue_heart: |
| ------------------------------------------------------------------------ | -------------------------------------------------------------- | :-----------------------------------------------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------: | :------: | :---------------: |
| [`no-conditional-statements`](./docs/rules/no-conditional-statements.md) | Disallow conditional statements (`if` and `switch` statements) | :heavy_check_mark: | :heavy_check_mark: | :green_circle: | | | :thought_balloon: |
| [`no-expression-statements`](./docs/rules/no-expression-statements.md) | Disallow expressions to cause side-effects | :heavy_check_mark: | :heavy_check_mark: | | | | :thought_balloon: |
| [`no-loop-statements`](./docs/rules/no-loop-statements.md) | Disallow imperative loops | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | |
| [`no-return-void`](./docs/rules/no-return-void.md) | Disallow functions that return nothing | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :thought_balloon: |
| Name | Description | πŸ’Ό | ⚠️ | 🚫 | πŸ”§ | πŸ’‘ | ❌ |
| :------------------------------------------------------- | :----------------------------------------------------- | :-------------------------------- | :-- | :---- | :-- | :-- | :-- |
| [no-promise-reject](docs/rules/no-promise-reject.md) | Disallow try-catch[-finally] and try-finally patterns. | | | | | | |
| [no-throw-statements](docs/rules/no-throw-statements.md) | Disallow throwing exceptions. | β˜‘οΈ ![badge-no-exceptions][] βœ… πŸ”’ | | | | | |
| [no-try-statements](docs/rules/no-try-statements.md) | Disallow try-catch[-finally] and try-finally patterns. | ![badge-no-exceptions][] πŸ”’ | | β˜‘οΈ βœ… | | | |
### No Exceptions Rules
### No Mutations
| Name | Description | <span title="No Exceptions">:fleur_de_lis:</span> | <span title="Strict">:speak_no_evil:</span> | <span title="Recommended">:see_no_evil:</span> | <span title="Lite">:hear_no_evil:</span> | :wrench: | :blue_heart: |
| ------------------------------------------------------------ | ----------------------------------------------------- | :-----------------------------------------------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------: | :------: | :----------: |
| [`no-promise-reject`](./docs/rules/no-promise-reject.md) | Disallow rejecting Promises | | | | | | |
| [`no-throw-statements`](./docs/rules/no-throw-statements.md) | Disallow throwing exceptions | :heavy_check_mark: | :heavy_check_mark: | :green_circle: | :green_circle: | | |
| [`no-try-statements`](./docs/rules/no-try-statements.md) | Disallow try-catch[-finally] and try-finally patterns | :heavy_check_mark: | :heavy_check_mark: | | | | |
| NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  | Description | πŸ’Ό | ⚠️ | 🚫 | πŸ”§ | πŸ’‘ | ❌ |
| :--------------------------------------------------------------------------- | :-------------------------------------------------------------- | :------------------------------- | :-- | :-- | :-- | :-- | :-- |
| [immutable-data](docs/rules/immutable-data.md) | Enforce treating data as immutable. | β˜‘οΈ ![badge-no-mutations][] βœ… πŸ”’ | | | | | |
| [no-let](docs/rules/no-let.md) | Disallow mutable variables. | β˜‘οΈ ![badge-no-mutations][] βœ… πŸ”’ | | | | | |
| [prefer-immutable-types](docs/rules/prefer-immutable-types.md) | Require function parameters to be typed as certain immutability | β˜‘οΈ ![badge-no-mutations][] βœ… πŸ”’ | | | πŸ”§ | | |
| [prefer-readonly-type](docs/rules/prefer-readonly-type.md) | Prefer readonly types over mutable types. | | | | πŸ”§ | | ❌ |
| [type-declaration-immutability](docs/rules/type-declaration-immutability.md) | Enforce the immutability of types based on patterns. | β˜‘οΈ ![badge-no-mutations][] βœ… πŸ”’ | | | πŸ”§ | | |
### Currying Rules
### No Other Paradigms
| Name | Description | <span title="Currying">:fleur_de_lis:</span> | <span title="Strict">:speak_no_evil:</span> | <span title="Recommended">:see_no_evil:</span> | <span title="Lite">:hear_no_evil:</span> | :wrench: | :blue_heart: |
| ---------------------------------------------------------------- | ----------------------------------------- | :------------------------------------------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------: | :------: | :----------: |
| [`functional-parameters`](./docs/rules/functional-parameters.md) | Functions must have functional parameters | :heavy_check_mark: | :heavy_check_mark: | :green_circle: | :green_circle: | | |
| NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β  | Description | πŸ’Ό | ⚠️ | 🚫 | πŸ”§ | πŸ’‘ | ❌ |
| :------------------------------------------------------- | :------------------------------------------------------------------------ | :------------------------------------- | :-- | :---- | :-- | :-- | :-- |
| [no-classes](docs/rules/no-classes.md) | Disallow classes. | β˜‘οΈ ![badge-no-other-paradigms][] βœ… πŸ”’ | | | | | |
| [no-mixed-types](docs/rules/no-mixed-types.md) | Restrict types so that only members of the same kind are allowed in them. | β˜‘οΈ ![badge-no-other-paradigms][] βœ… πŸ”’ | | | | | |
| [no-this-expressions](docs/rules/no-this-expressions.md) | Disallow this access. | ![badge-no-other-paradigms][] πŸ”’ | | β˜‘οΈ βœ… | | | |
### Stylistic Rules
### No Statements
| Name | Description | <span title="Stylistic">:fleur_de_lis:</span> | <span title="Strict">:speak_no_evil:</span> | <span title="Recommended">:see_no_evil:</span> | <span title="Lite">:hear_no_evil:</span> | :wrench: | :blue_heart: |
| -------------------------------------------------------------------------- | ----------------------------------------------------------------------- | :-------------------------------------------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------: | :------: | :---------------: |
| [`prefer-property-signatures`](./docs/rules/prefer-property-signatures.md) | Enforce property signatures over method signatures | :heavy_check_mark: | | | | | :thought_balloon: |
| [`prefer-tacit`](./docs/rules/prefer-tacit.md) | Tacit/Point-Free style. | :heavy_check_mark: | | | | :wrench: | :blue_heart: |
| [`readonly-type`](./docs/rules/readonly-type.md) | Require consistently using either `readonly` keywords or `Readonly<T>`. | :heavy_check_mark: | | | | :wrench: | :thought_balloon: |
| Name | Description | πŸ’Ό | ⚠️ | 🚫 | πŸ”§ | πŸ’‘ | ❌ |
| :------------------------------------------------------------------- | :--------------------------------------------- | :-------------------------------- | :-- | :-- | :-- | :-- | :-- |
| [no-conditional-statements](docs/rules/no-conditional-statements.md) | Disallow conditional statements. | ![badge-no-statements][] βœ… πŸ”’ | | β˜‘οΈ | | | |
| [no-expression-statements](docs/rules/no-expression-statements.md) | Disallow expression statements. | ![badge-no-statements][] βœ… πŸ”’ | | β˜‘οΈ | | | |
| [no-loop-statements](docs/rules/no-loop-statements.md) | Disallow imperative loops. | β˜‘οΈ ![badge-no-statements][] βœ… πŸ”’ | | | | | |
| [no-return-void](docs/rules/no-return-void.md) | Disallow functions that don't return anything. | β˜‘οΈ ![badge-no-statements][] βœ… πŸ”’ | | | | | |
### Key
### Stylistic
| Symbol | Meaning |
| :----------------: | -------------------------------------------------------------------------------------------------------------------------------- |
| :fleur_de_lis: | Ruleset: Current |
| :speak_no_evil: | Ruleset: Strict |
| :see_no_evil: | Ruleset: Recommended |
| :hear_no_evil: | Ruleset: Lite |
| :heavy_check_mark: | Enabled as Error |
| :green_circle: | Enabled as Error with Overrides |
| :wrench: | Fixable |
| :thought_balloon: | Only Available for TypeScript |
| :blue_heart: | <span title="Type Information will be used if available making the rule work in more cases.">Works better with TypeScript</span> |
| NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  | Description | πŸ’Ό | ⚠️ | 🚫 | πŸ”§ | πŸ’‘ | ❌ |
| :--------------------------------------------------------------------- | :--------------------------------------------------------------------- | :-- | :-- | :-- | :-- | :-- | :-- |
| [prefer-property-signatures](docs/rules/prefer-property-signatures.md) | Prefer property signatures over method signatures. | 🎨 | | | | | |
| [prefer-tacit](docs/rules/prefer-tacit.md) | Replaces `x => f(x)` with just `f`. | | 🎨 | | | πŸ’‘ | |
| [readonly-type](docs/rules/readonly-type.md) | Require consistently using either `readonly` keywords or `Readonly<T>` | 🎨 | | | πŸ”§ | | |
<!--
| :warning: | Enabled as Warning |
| :yellow_circle: | Enabled as Warning with Overrides |
-->
<!-- end auto-generated rules list -->
[badge-currying]: https://img.shields.io/badge/-currying-red.svg
[badge-lite]: https://img.shields.io/badge/-lite-green.svg
[badge-no-exceptions]: https://img.shields.io/badge/-no--exceptions-blue.svg
[badge-no-mutations]: https://img.shields.io/badge/-no--mutations-orange.svg
[badge-no-other-paradigms]: https://img.shields.io/badge/-no--other--paradigms-yellow.svg
[badge-no-statements]: https://img.shields.io/badge/-no--statements-purple.svg
## External Recommended Rules

@@ -166,4 +178,8 @@

## Contributing
[See our contributing guide](./CONTRIBUTING.md).
## Prior work
This project started off as a port of [tslint-immutable](https://github.com/jonaskello/tslint-immutable) which was originally inspired by [eslint-plugin-immutable](https://github.com/jhusain/eslint-plugin-immutable).

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc