Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/env node
const rw = require('rw').dash
const prettier = require('prettier')
const stringify = require('json-stable-stringify')
// https://github.com/prettier/prettier/tree/a707dda53b13a6956a825609f30baead7ef08a59#api
const prettierOptions = {
printWidth: 80,
tabWidth: 2,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true
}
const content = rw.readFileSync(process.argv[2] || '-').toString()
let pretty = content
// try to format JS files