This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/eslint/lib/rules/no-ternary.js
2019-08-11 20:48:02 +02:00

37 lines
793 B
JavaScript

/**
* @fileoverview Rule to flag use of ternary operators.
* @author Ian Christian Myers
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "disallow ternary operators",
category: "Stylistic Issues",
recommended: false,
url: "https://eslint.org/docs/rules/no-ternary"
},
schema: []
},
create(context) {
return {
ConditionalExpression(node) {
context.report({ node, message: "Ternary operator used." });
}
};
}
};