Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handler: argv => {
const lintOptions = require('standard/options')
const lint = require('standard-engine').cli
const { cwd } = argv
// remove sub-command 'lint' from args
process.argv.splice(2, 1)
lint(assign({ cwd }, lintOptions))
}
}
// programmatic usage
var Linter = require('standard-engine').linter
var opts = require('./options.js')
module.exports = new Linter(opts)
// programmatic usage
const Linter = require('standard-engine').linter
const opts = require('./options.js')
module.exports = new Linter(opts)
#!/usr/bin/env node
if (process.version.match(/v(\d+)\./)[1] < 4) {
console.error('standardx: Node v4 or greater is required. `standardx` did not run.')
} else {
var opts = require('../options')
require('standard-engine').cli(opts)
}
#!/usr/bin/env node
var match = process.version.match(/v(\d+)\.(\d+)/)
var major = parseInt(match[1], 10)
var minor = parseInt(match[2], 10)
if (major >= 9 || (major === 8 && minor >= 6)) {
require('standard-engine').cli(require('../options'))
} else {
console.error('standard: Node 8 or greater is required. `standard` did not run.')
}
command: (args) => {
const lintOptions = require('standard/options')
const lint = require('standard-engine').cli
const { cwd } = api.config.all()
process.argv.splice(2, 1)
lint(assign({ cwd }, lintOptions))
}
}))
#!/usr/bin/env node
var opts = require('../options.js')
require('standard-engine').cli(opts)
const path = require('path')
const pkg = require('./package.json')
const opts = {
version: pkg.version,
homepage: pkg.homepage,
bugs: pkg.bugs.url,
eslint: eslint,
cmd: 'linter',
eslintConfig: {
configFile: path.join(__dirname, '.eslintrc.json'),
},
cwd: '',
}
require('standard-engine').cli(opts)
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',
const Linter = require('standard-engine').linter
const opts = require('./options')
module.exports = new Linter(opts)