Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

156
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda