eslint-plugin-total-functions
eslint-plugin-total-functions copied to clipboard
no-unsafe-mutable-readonly-assignment should whitelist `Array.from`
Ditto Array.of
Be careful of this: https://github.com/danielnixon/eslint-plugin-total-functions/issues/730
Should also whitelist immediate assignment from an array spread, like this:
// eslint-disable-next-line total-functions/no-unsafe-mutable-readonly-assignment
const foo: readonly string[] = [...new Set(["a"] as const)];
Should also consider whitelisting constructors, such as:
const foo: ReadonlyDate = new Date(...);