trezor / trezor-suite

Trezor Suite Monorepo
https://trezor.io/trezor-suite
Other
674 stars 242 forks source link

Add rule to enforce inline function when possible #13075

Open peter-sanderson opened 1 week ago

peter-sanderson commented 1 week ago

To simplify a code, it would be nice to have arrow function where possible.

There is a ESLint rule for it: https://eslint.org/docs/latest/rules/arrow-body-style

Draft implementation: https://github.com/trezor/trezor-suite/pull/13074/files

PeKne commented 6 days ago

We are using Typescript function overloads that do not work with arrow functions and I'm afraid that this rule would complain about all of them...