eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

typescript/array-callback-return-type

ESLint plugin / typescript/array-callback-return-type

Requires boolean return type in array callbacks.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/typescript/array-callback-return-type": "error"
  }
};

Examples of incorrect code

[1, true].every(x => x);

Examples of correct code

[1].every(x => x);
[""].every(x => x);
[false].every(x => x);