all files / rules/ jsx-no-new-array-as-prop.js

66.67% Statements 2/3
0% Branches 0/2
0% Functions 0/1
66.67% Lines 2/3
1 2 3 4 5 6 7 8 9 10 11 12                   
"use strict";
 
const { checkConstructor, createRule } = require("../utils/common");
 
module.exports = createRule(
  "Prevent [...] as JSX prop value",
  "JSX attribute values should not contain Arrays created in the same scope",
  function(node) {
    return node.type === "ArrayExpression" || checkConstructor(node, "Array");
  }
);