UNPKG

putout

Version:

🐊 Pluggable and configurable code transformer with built-in ESLint, Babel and support of js, jsx, typescript, flow, markdown, yaml and json

11 lines (8 loc) 295 B
import {branch, merge} from '@putout/processor-json'; import putout from '../putout.js'; export const lintJSON = (rawSource, options) => { const list = branch(rawSource); const {source} = list[0]; const {code} = putout(source, options); return merge(rawSource, [code]); };