Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
electrovir committed Jul 23, 2023
1 parent f1f4c69 commit 2bb919a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 0 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ const options: Record<keyof MultilineArrayOptions, SupportOption> = getObjectTyp
const defaultOptions: Partial<RequiredOptions> & Required<MultilineArrayOptions> =
defaultMultilineArrayOptions;

getSupportInfo().then(supportInfo => {
debugger;
// console.log(supportInfo.languages)
})

// const languages = [
// {name: 'JavaScript', parsers: ['babel', 'acorn', 'espree', 'meriyah', 'babel-flow', 'babel-ts', 'flow', 'typescript']},
// {name: 'TypeScript', parsers: ['typescript', 'babel-ts']},
Expand Down
1 change: 0 additions & 1 deletion src/preprocessing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export function wrapParser(originalParser: Parser, parserName: string) {
});

console.log('attaching the preprocessor', originalParser);
debugger;
function multilineArraysPluginPreprocess(text: string, options: ParserOptions) {

console.log('firing the preprocessor');
Expand Down
9 changes: 5 additions & 4 deletions src/printer/multiline-array-printer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as prettierPluginBabel from "prettier/plugins/babel";
import {Node} from 'estree';
import {AstPath, ParserOptions, Printer} from 'prettier';
import {MultilineArrayOptions, envDebugKey, fillInOptions} from '../options';
Expand All @@ -14,13 +15,13 @@ function wrapInOriginalPrinterCall<T extends string = string>(
const originalPrinter = getOriginalPrinter();

if (property === 'print') {
const path = args[0] as AstPath;
const options = args[1] as ParserOptions;
debugger;
const argsToUse = args[3] ? args : args.slice(0,3);
const originalOutput = originalPrinter.print.call(
originalPrinter,
path,
options,
...(args.slice(2) as [any]),
...(argsToUse as [any, any, any, any])

);
if (
options.filepath?.endsWith('package.json') &&
Expand Down

0 comments on commit 2bb919a

Please sign in to comment.