π Disallow using 1 as the depth argument of Array#flat().
πΌ This rule is enabled in the following configs: β
recommended, βοΈ unopinionated.
π§ This rule is automatically fixable by the --fix CLI option.
Passing 1 as the depth argument to Array#flat(depth) is unnecessary.
// β
foo.flat(1);
// β
foo.flat();// β
foo?.flat(1);
// β
foo?.flat();