How to use the standard-engine.linter function in standard-engine

To help you get started, we’ve selected a few standard-engine 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 standard / semistandard / index.js View on Github external
// programmatic usage
var Linter = require('standard-engine').linter

var opts = require('./options.js')

module.exports = new Linter(opts)
github KidkArolis / healthier / index.js View on Github external
// programmatic usage
const Linter = require('standard-engine').linter

const opts = require('./options.js')

module.exports = new Linter(opts)
github KidkArolis / healthier / bin / standard-engine.js View on Github external
function Cli(opts) {
  const Linter = require('standard-engine').linter
  const standard = new Linter(opts)

  opts = Object.assign(
    {
      cmd: 'standard-engine',
      tagline: 'JavaScript Custom Style',
      version: '0.0.0'
    },
    opts
  )

  const argv = minimist(process.argv.slice(2), {
    alias: {
      global: 'globals',
      plugin: 'plugins',
      env: 'envs',
      format: 'f',
github standard / standard / index.js View on Github external
const Linter = require('standard-engine').linter
const opts = require('./options')

module.exports = new Linter(opts)
github conveyal / mastarm / lib / format.js View on Github external
module.exports = function format (files) {
  const linter = new Linter({
    eslint,
    eslintConfig: {
      configFile: path.join(__dirname, './eslintrc.json')
    }
  })

  if (files.length === 0) {
    files = ['__mocks__', '__tests__', 'bin', 'lib', 'src', './']
  }

  /**
   * Run the linter.lintText function as a promise with provide prettified text.
   */
  function promisifiedLint (prettified) {
    return new Promise((resolve, reject) => {
      linter.lintText(prettified, {fix: true}, (err, standardized) => {

standard-engine

Wrap your standards in a tortilla and cover it in special sauce.

MIT
Latest version published 1 year ago

Package Health Score

63 / 100
Full package analysis

Popular standard-engine functions