eslint-plugin-functional icon indicating copy to clipboard operation
eslint-plugin-functional copied to clipboard

ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.

Results 70 eslint-plugin-functional issues
Sort by recently updated
recently updated
newest added
trafficstars

## Bug Report https://typescript.tv/errors/#ts1064 There's no way to type the return as Readonly

Type: Bug
Status: Triage

## Suggestion 👋 Coming over from https://github.com/eslint/eslint/issues/18093: ESLint is migrating to a [new "flat config" format](https://eslint.org/docs/latest/use/configure/configuration-files-new) that will be the default in ESLint v9. It doesn't look like `eslint-plugin-functional` has...

Priority: Medium
Accepted

## Bug Report This errors with `ignoreImmediateMutation` set. ```ts Object.entries(foo).sort(...); ``` ### Expected behavior No error. ### Actual behavior Modifying an array is not allowed.

Type: Bug

## Bug Report the `functional/immutable-data` rule with `ignoreImmediateMutation: true` will trigger an error when immediately mutating an array created with the string `.split()` method ### Expected behavior these rules ```...

Type: Bug
Accepted

## Bug Report Hi, me again with another recursion issue :P ```ts export type ReadonlyURLSearchParams = Readonly< OmitStrict >; // explosion here export const readonlyURLSearchParams = ( // eslint-disable-next-line functional/prefer-immutable-types...

Type: Bug
Status: Investigation Needed

## Bug Report no-mixed-types fails when a function type is aliased as part of a larger object type ### Expected behavior aliases are understood correctly ### Actual behavior functional/no-mixed-types fails...

Type: Bug

## Suggestion So I think the idea of this rule is to treat everything immutable (by using `const` everywhere and avoiding typing everything as `Readonly`) and use `let` when explicitly...

Type: Idea
Status: Triage

## Bug Report ```ts type Thing = { a: string }; type OtherThing = { readonly a: string }; declare const a: readonly OtherThing[]; // Surprising. I would expect ReadonlyShallow,...

Type: Bug
Status: Triage

## Suggestion A new rule that forbids the partial versions of `reduce` and `reduceRight`. Given: ```typescript const arr: readonly string[] = ...; // may or may not be empty ```...

Type: Idea
Status: Awaiting Feedback