Skip to main content

ðŸŸĄ Functional

Use this preset when you want strict functional-style constraints as your default.

Config key​

immutable.configs.functional

Flat Config example​

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

export default [immutable.configs.functional];

functional builds on functional-lite and additionally bans classes, this, throw, try, and bare expression statements while promoting no-method-signature from a migration warning to an error.

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-class—
no-conditional-statement—
no-cookie-mutation—
no-data-view-mutation—
no-date-mutation—
no-dom-token-list-mutation—
no-expression-statement—
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-this—
no-throw—
no-try—
no-typed-array-mutation—
no-url-mutation—
no-url-search-params-mutation—
readonly-array🔧
readonly-keyword🔧