Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

102
Views
Eslint - No empty first and last lines for function bodies

Which rule is used for converting this code

function sayHello() {

   console.log("Hello world!");

}

into

function sayHello() {
   console.log("Hello world!"); // No empty lines at the end and beginning
}

?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There's a rule for blocks: padded-blocks.

If enabled, an option is:

"blocks" require or disallow padding within block statements, function bodies, and class static blocks

There doesn't look to be a configurable option for functions in particular.

You'll want the config option:

[2, 'never']

or

[2, { blocks: 'never' }]
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!