Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 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)
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)
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) => {