orionsoft-react-scripts
Version:
Orionsoft Configuration and scripts for Create React App.
35 lines (25 loc) • 690 B
JavaScript
/**
* @fileoverview Rule to flag use of ternary operators.
* @author Ian Christian Myers
*/
;
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = {
meta: {
docs: {
description: "disallow ternary operators",
category: "Stylistic Issues",
recommended: false
},
schema: []
},
create(context) {
return {
ConditionalExpression(node) {
context.report(node, "Ternary operator used.");
}
};
}
};