How to use the standard.lintFiles function in standard

To help you get started, we’ve selected a few standard examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngnjs / NGN / test / syntax-checker.js View on Github external
console.log(
          '  %s:%d:%d: %s%s',
          result.filePath, message.line || 0, message.column || 0, message.message,
          Args.value('verbose') ? ' (' + message.ruleId + ')' : ''
        )
      })
    })

    process.exitCode = result.errorCount ? 1 : 0
  }
}

if (scanFile) {
  standard.lintText(fs.readFileSync(scanpath).toString(), opts, output)
} else {
  standard.lintFiles(scanpath, opts, output)
}
github zce / x-pages / lib / index.js View on Github external
const lint = done => {
  const comb = new Comb(require('./.csscomb.json'))
  comb.processPath(config.src)
  const cwd = path.join(__dirname, config.src)
  standard.lintFiles(config.paths.scripts, { cwd, fix: true }, done)
}
github elastic / elasticsearch-js / scripts / generate.js View on Github external
function lintFiles (log, cb) {
    log.text = 'Linting...'
    const files = [join(packageFolder, '*.js'), join(apiOutputFolder, '*.js')]
    standard.lintFiles(files, { fix: true }, err => {
      if (err) {
        return log.fail(err.message)
      }
      cb()
    })
  }
}

standard

JavaScript Standard Style

MIT
Latest version published 2 months ago

Package Health Score

81 / 100
Full package analysis