src/index.js
/**
 * Takes Stylelint results (with messages) and adapts them to Checkstyle format.
 * @param  {Array<Object>} resultList List of results in Stylelint format.
 * @throws {Error}                    An error is thrown if linting issues have been detected.
 * @return {undefined}                Nothing is returned.
 */
Takes Stylelint results (with messages) and adapts them to Checkstyle format.
@param  {Array} resultList List of results in Stylelint format.
@throws {Error}                    An error is thrown if linting issues have been detected.
@return {undefined}                Nothing is returned.
Takes Stylelint results ( with messages ) and adapts them to Checkstyle format . @param { Array } resultList List of results in Stylelint format . @throws { Error } An error is thrown if linting issues have been detected . @return { undefined } Nothing is returned .
function failAfterAllErrorsReporter(resultList) {
  const errorCount = countIssuesInResultList(resultList);
  if (errorCount > 0) {
    const errorNotice = errorCount === 1 ? 'issue has' : 'issues have';
    throw new Error(`${errorCount} linting ${errorNotice} been found.`);
  }
}
function failAfterAllErrorsReporter ( resultList ) { const errorCount = countIssuesInResultList ( resultList ) ; if ( errorCount > 0 ) { const errorNotice = errorCount === 1 ? 'issue has' : 'issues have' ; throw new Error ( ` ${ errorCount } ${ errorNotice } ` ) ; } }
Takes Stylelint results (with messages) and adapts them to Checkstyle format.
Takes Stylelint results ( with messages ) and adapts them to Checkstyle format .