Sha256: 6af467d87addbaaaede7e7dc38cbae39b789c7c8c31eac25722cd6bb68c18da7

Contents?: true

Size: 506 Bytes

Versions: 2

Compression:

Stored size: 506 Bytes

Contents

/**
 * @fileoverview Rule to flag use of ternary operators.
 * @author Ian Christian Myers
 */

"use strict";

//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------

module.exports = function(context) {

    return {

        "ConditionalExpression": function(node) {
            context.report(node, "Ternary operator used.");
        }

    };

};

module.exports.schema = [];

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eslint_node_modules-1.6.0.1 vendor/node_modules/eslint/lib/rules/no-ternary.js
eslint_node_modules-1.6.0 vendor/node_modules/eslint/lib/rules/no-ternary.js