We are using the is-immutable-type library to determine the immutability of types. This library can be configure for all rules at once using a shared setting.
For details see the overrides section of is-immutable-type.
In this example, we are configuring is-immutable-type to treat any readonly array (regardless of the syntax used) as immutable in the case where it was found to be deeply readonly. If it was only found to be shallowly readonly, then no override will be applied.