Skip to main content

🟠 Immutable

Use this preset when you want the broader immutable baseline beyond recommended.

Config key​

immutable.configs.immutable

Flat Config example​

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

export default [immutable.configs.immutable];

This preset keeps the targeted mutation guards from recommended and adds broader declaration and readonly typing discipline such as no-let, readonly-array, readonly-keyword, and warning-level no-method-signature, without the broader functional-style bans in functional-lite and functional.

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-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-map-set-mutation—
no-method-signatureðŸ’Ą
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🔧