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

161
Views
Eslint ES6 rule for assignment via function with no return

I am looking for an eslint rule to toggle a check to use a value from a function with no return.

As of now, I was using the strongloop config and came across this important use case check that my config is missing:

// ********
// aCtrl.js
// ********
function a() {
  // Does work with no return
}
module.exports = {a};


// ********
// index.js
// ********
const aCtrl = require(".../aCtrl");
const useless = aCtrl.a();

As you can see, a() has no return, yet useless is assigned the return value of a(). I'm hoping to catch this with eslint so that this mistake does not lead to a runtime error resulting from useless being used downstream.

about 4 years ago · Juan Pablo Isaza
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!