lib/rules/require-meta-docs-url.js
function insertProperty (fixer, node, propertyText) {
      if (node.properties.length === 0) {
        return fixer.replaceText(node, `{\n${propertyText}\n}`);
      }
      return fixer.insertTextAfter(
        sourceCode.getLastToken(node.properties[node.properties.length - 1]),
        `,\n${propertyText}`
      );
    }
function insertProperty (fixer, node, propertyText) {
      if (node.properties.length === 0) {
        return fixer.replaceText(node, `{\n${propertyText}\n}`);
      }
      return fixer.insertTextAfter(
        sourceCode.getLastToken(node.properties[node.properties.length - 1]),
        `,\n${propertyText}`
      );
    }
function insertProperty ( fixer , node , propertyText ) { if ( node . properties . length === 0 ) { return fixer . replaceText ( node , ` \n ${ propertyText } \n ` ) ; } return fixer . insertTextAfter ( sourceCode . getLastToken ( node . properties [ node . properties . length - 1 ] ) , ` \n ${ propertyText } ` ) ; }
Insert a given property into a given object literal.
@param {SourceCodeFixer} fixer The fixer.
@param {Node} node The ObjectExpression node to insert a property.
@param {string} propertyText The property code to insert.
@returns {void}
Insert a given property into a given object literal .