lib/rules/functionCommaSpaceChecker.js
function getCommaCheckIndex(commaNode, nodeIndex) {
        let commaBefore =
          valueNode.before +
          argumentStrings.slice(0, nodeIndex).join("") +
          commaNode.before;

        // 1. Remove comments including preceeding whitespace (when only succeeded by whitespace)
        // 2. Remove all other comments, but leave adjacent whitespace intact
        commaBefore = commaBefore.replace(
          /( *\/(\*.*\*\/(?!\S)|\/.*)|(\/(\*.*\*\/|\/.*)))/,
          ""
        );

        return commaBefore.length;
      }
function getCommaCheckIndex(commaNode, nodeIndex) {
        let commaBefore =
          valueNode.before +
          argumentStrings.slice(0, nodeIndex).join("") +
          commaNode.before;

        // 1. Remove comments including preceeding whitespace (when only succeeded by whitespace)
        // 2. Remove all other comments, but leave adjacent whitespace intact
        commaBefore = commaBefore.replace(
          /( *\/(\*.*\*\/(?!\S)|\/.*)|(\/(\*.*\*\/|\/.*)))/,
          ""
        );

        return commaBefore.length;
      }
function getCommaCheckIndex ( commaNode , nodeIndex ) { let commaBefore = valueNode . before + argumentStrings . slice ( 0 , nodeIndex ) . join ( "" ) + commaNode . before ; // 1. Remove comments including preceeding whitespace (when only succeeded by whitespace) // 2. Remove all other comments, but leave adjacent whitespace intact commaBefore = commaBefore . replace ( / ( *\/(\*.*\*\/(?!\S)|\/.*)|(\/(\*.*\*\/|\/.*))) / , "" ) ; return commaBefore . length ; }
Gets the index of the comma for checking.
@param {Node} commaNode The comma node
@param {number} nodeIndex The index of the comma node
@returns {number} The index of the comma for checking
Gets the index of the comma for checking .