$ cnpm install @putout/cli-process-file
Process file using ????Putout, Samadhi and ESLint.
npm i @putout/cli-process-file
import {initProcessFile} from '@putout/cli-process-file';
const processFile = initProcessFile({
fix: true,
});
const {code, places} = await processFile({
source: `
const a = b.a
`,
});
// returns
['const {a} = b;', [{
rule: 'no-undef (eslint)',
message: '\'b\' is not defined.',
position: {
line: 2,
column: 13,
},
}]];
MIT
Copyright 2013 - present © cnpmjs.org | Home |