Skip to main content

ðŸŸĒ Functional Lite

Use this preset when you want a moderate functional step up from immutable.

Config key​

immutable.configs["functional-lite"]

Flat Config example​

import immutable from "eslint-plugin-immutable-2";

export default [immutable.configs["functional-lite"]];

This preset keeps the full immutable baseline and layers only a small set of structural functional rules on top of it while still allowing returning branches in conditional expressions. The "lite" label refers to the added functional constraints, not the total number of enabled immutable rules.

Rules in this preset​

  • Fix legend:
    • 🔧 = autofixable
    • ðŸ’Ą = suggestions available
    • — = report only
RuleFix
immutable-data—
no-abort-controller-mutation—
no-atomics-mutation—
no-buffer-mutation—
no-cache-api-mutation—
no-conditional-statement—
no-cookie-mutation—
no-data-view-mutation—
no-date-mutation—
no-dom-token-list-mutation—
no-form-data-mutation—
no-headers-mutation—
no-history-mutation—
no-letðŸ’Ą
no-location-mutation—
no-loop-statement—
no-map-set-mutation—
no-method-signatureðŸ’Ą
no-mixed-interface—
no-process-env-mutation—
no-reflect-mutation—
no-regexp-lastindex-mutation—
no-stateful-regexp—
no-storage-mutation—
no-typed-array-mutation—
no-url-mutation—
no-url-search-params-mutation—
readonly-array🔧
readonly-keyword🔧