Is there any way to configure eslint (ideally with --fix) to always put functions at the end?
// Before/incorrect
function f() {
return 5
}
const x = f()
function g() {
function h() { return 6 }
return h()
}
const y = g()
// After/correct
const x = f()
const y = g()
function f() { return 5 }
function g() {
return h()
function h() { return 6 }
}
See also: https://github.com/eslint/eslint/discussions/15633