eslint-plugin-functional
Advanced tools
Comparing version 3.3.0 to 3.4.0
@@ -10,6 +10,18 @@ # Changelog | ||
## [v3.3.0](https://github.com/jonaskello/eslint-plugin-functional/compare/v3.2.2...v3.3.0) | ||
## [v3.4.0](https://github.com/jonaskello/eslint-plugin-functional/compare/v3.3.0...v3.4.0) | ||
### Merged | ||
- docs: enable github discussions and remove link to spectrum [`#238`](https://github.com/jonaskello/eslint-plugin-functional/pull/238) | ||
### Fixed | ||
- fix(prefer-tacit): cannot read property 'type' of undefined [`#221`](https://github.com/jonaskello/eslint-plugin-functional/issues/221) [`#194`](https://github.com/jonaskello/eslint-plugin-functional/issues/194) | ||
- fix(prefer-readonly-type): allow inline mutable return types [`#98`](https://github.com/jonaskello/eslint-plugin-functional/issues/98) | ||
- fix(prefer-readonly-type): computed property fixer [`#200`](https://github.com/jonaskello/eslint-plugin-functional/issues/200) | ||
## [v3.3.0](https://github.com/jonaskello/eslint-plugin-functional/compare/v3.2.2...v3.3.0) - 2021-07-27 | ||
### Fixed | ||
- feat(no-conditional-statement): support never-returning functions for option allowReturningBranches [`#99`](https://github.com/jonaskello/eslint-plugin-functional/issues/99) | ||
@@ -16,0 +28,0 @@ |
@@ -509,3 +509,3 @@ 'use strict'; | ||
const version = "3.2.2"; | ||
const version = "3.3.0"; | ||
@@ -1537,12 +1537,12 @@ function checkNode(check, context, options) { | ||
} | ||
function checkProperty(node, context) { | ||
function checkProperty(node, context, options) { | ||
return { | ||
context, | ||
descriptors: node.readonly | ||
? [] | ||
: [ | ||
descriptors: !node.readonly && | ||
(!options.allowMutableReturnType || !isInReturnType(node)) | ||
? [ | ||
{ | ||
node, | ||
messageId: "property", | ||
fix: isTSIndexSignature(node) | ||
fix: isTSIndexSignature(node) || isTSPropertySignature(node) | ||
? (fixer) => fixer.insertTextBefore(node, "readonly ") | ||
@@ -1553,3 +1553,4 @@ : isTSParameterProperty(node) | ||
}, | ||
], | ||
] | ||
: [], | ||
}; | ||
@@ -1675,8 +1676,10 @@ } | ||
return ((declaration !== null && | ||
declaration !== undefined && | ||
(isFunctionLike(declaration) || isTSFunctionType(declaration)) && | ||
declaration.params.length === caller.arguments.length) || | ||
tsDeclaration.parameters | ||
.slice(caller.arguments.length) | ||
.every((param) => param.initializer !== undefined || | ||
param.questionToken !== undefined)); | ||
(tsDeclaration.parameters !== undefined && | ||
tsDeclaration.parameters | ||
.slice(caller.arguments.length) | ||
.every((param) => param.initializer !== undefined || | ||
param.questionToken !== undefined))); | ||
} | ||
@@ -1683,0 +1686,0 @@ } |
{ | ||
"name": "eslint-plugin-functional", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"description": "ESLint rules to disable mutation and promote fp in TypeScript.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -12,4 +12,5 @@ <div align="center"> | ||
[![MIT license](https://img.shields.io/github/license/jonaskello/eslint-plugin-functional.svg?style=flat)](https://opensource.org/licenses/MIT) | ||
[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/eslint-functional) | ||
[![GitHub Discussions](https://img.shields.io/github/discussions/jonaskello/eslint-plugin-functional)](https://github.com/jonaskello/eslint-plugin-functional/discussions) | ||
An [ESLint](http://eslint.org) plugin to disable mutation and promote functional programming in JavaScript and TypeScript. | ||
@@ -217,3 +218,3 @@ | ||
| ---------------------------------------------------------------------- | ---------------------------------------------------------- | :----------------------------------------------: | :--------------------------------------: | :----------------------------------------------: | :------: | :---------------: | | ||
| [`no-conditional-statement`](./docs/rules/no-conditional-statement.md) | Disallow conditional statements (if and switch statements) | :heavy_check_mark: | | :heavy_check_mark: | | | | ||
| [`no-conditional-statement`](./docs/rules/no-conditional-statement.md) | Disallow conditional statements (if and switch statements) | :heavy_check_mark: | | :heavy_check_mark: | | :thought_balloon: | | ||
| [`no-expression-statement`](./docs/rules/no-expression-statement.md) | Disallow expressions to cause side-effects | :heavy_check_mark: | | :heavy_check_mark: | | | | ||
@@ -246,4 +247,4 @@ | [`no-loop-statement`](./docs/rules/no-loop-statement.md) | Disallow imperative loops | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | ||
| Name | Description | <span title="Stylistic">:see_no_evil:</span> | <span title="Lite">:hear_no_evil:</span> | <span title="Recommended">:speak_no_evil:</span> | :wrench: | :blue_heart: | | ||
| ---------------------------------------------- | ----------------------- | :-----------------------------------------: | :--------------------------------------: | :----------------------------------------------: | :------: | :----------: | | ||
| [`prefer-tacit`](./docs/rules/prefer-tacit.md) | Tacit/Point-Free style. | :heavy_check_mark: | | | :wrench: | :blue_heart: | | ||
| ---------------------------------------------- | ----------------------- | :------------------------------------------: | :--------------------------------------: | :----------------------------------------------: | :------: | :----------: | | ||
| [`prefer-tacit`](./docs/rules/prefer-tacit.md) | Tacit/Point-Free style. | :heavy_check_mark: | | | :wrench: | :blue_heart: | | ||
@@ -250,0 +251,0 @@ ## Recommended standard rules |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
163281
3594
301