Last active
October 17, 2022 23:28
-
-
Save jonesnxt/e20ce8d213fe4b07ab98ad7bdb1a1812 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { parsers: typescriptParsers } = require('prettier/parser-typescript'); | |
const { parsers: javascriptParsers } = require('prettier/parser-babel'); | |
const S = require('subsecond'); | |
function preprocess(text, opts) { | |
S.load({ 'any.tsx': text }); | |
// A quick test to make sure everything works. | |
S().append('// its working!'); | |
// TODO: Your code modification goes here | |
return S.print()['any.tsx']; | |
} | |
module.exports = { | |
parsers: { | |
typescript: { | |
...typescriptParsers.typescript, | |
preprocess, | |
}, | |
babel: { | |
...javascriptParsers.babel, | |
preprocess, | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment