src/formatLessError.js
function formatLessError(err) {
  /* eslint-disable no-param-reassign */
  const msg = err.message;

  // Instruct webpack to hide the JS stack from the console
  // Usually you're only interested in the SASS stack in this case.
  err.hideStack = true;

  err.message = [
    os.EOL,
    ...getFileExcerptIfPossible(err),
    msg.charAt(0).toUpperCase() + msg.slice(1),
    `      in ${err.filename} (line ${err.line}, column ${err.column})`,
  ].join(os.EOL);

  return err;
}
function formatLessError(err) {
  /* eslint-disable no-param-reassign */
  const msg = err.message;

  // Instruct webpack to hide the JS stack from the console
  // Usually you're only interested in the SASS stack in this case.
  err.hideStack = true;

  err.message = [
    os.EOL,
    ...getFileExcerptIfPossible(err),
    msg.charAt(0).toUpperCase() + msg.slice(1),
    `      in ${err.filename} (line ${err.line}, column ${err.column})`,
  ].join(os.EOL);

  return err;
}
function formatLessError ( err ) { /* eslint-disable no-param-reassign */ const msg = err . message ; // Instruct webpack to hide the JS stack from the console // Usually you're only interested in the SASS stack in this case. err . hideStack = true ; err . message = [ os . EOL , ... getFileExcerptIfPossible ( err ) , msg . charAt ( 0 ) . toUpperCase ( ) + msg . slice ( 1 ) , ` ${ err . filename } ${ err . line } ${ err . column } ` , ] . join ( os . EOL ) ; return err ; }
Beautifies the error message from Less.

@param {LessError} lessErr
@param {string} lessErr.type - e.g. 'Name'
@param {string} lessErr.message - e.g. '.undefined-mixin is undefined'
@param {string} lessErr.filename - e.g. '/path/to/style.less'
@param {number} lessErr.index - e.g. 352
@param {number} lessErr.line - e.g. 31
@param {number} lessErr.callLine - e.g. NaN
@param {string} lessErr.callExtract - e.g. undefined
@param {number} lessErr.column - e.g. 6
@param {Array<string>} lessErr.extract - e.g. ['    .my-style {', '      .undefined-mixin;', '      display: block;']
@returns {LessError}
Beautifies the error message from Less .