0

There are a lot of options in the padding-line-between-statements role, but I can't find a role that forces this code:

const app = express()

app.use('/', (req, res) => {
    const x = req.body

    return x
})

To be with an empty line after app.use:

const app = express()

app.use('/', (req, res) => {

    const x = req.body

    return x
})

Of course, for this example, I can use { blankLine: "always", prev: ["*"], next: "const"}, but I'm looking for more generic solution.

The padded-blocks is almost what we need, except it add an empty line for both start and end of any block.

baruchiro
  • 5,088
  • 5
  • 44
  • 66
  • The [`padded-blocks`](https://eslint.org/docs/rules/padded-blocks) rule may be useful here, but it requires empty lines at the top _and_ bottom instead of just the top. Let me know if this is what you're looking for and I'll make it into an answer. – Adam Apr 22 '20 at 17:46
  • Oh, I forgot to talk about that. This was the rule I started with, but the team members didn't like it – baruchiro Apr 23 '20 at 11:21

0 Answers0