eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

no-chain-coalescence-mixture

ESLint plugin / no-chain-coalescence-mixture

Disallows mixing of chain and coalescence operators.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/no-chain-coalescence-mixture": "error"
  }
};

Examples of incorrect code

x?.y ?? z;

Examples of correct code

x?.y;
x ?? y;