Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test("schema", () => {
expect(generateSchema(prettier.getSupportInfo().options)).toMatchSnapshot();
});
function getCoreInfo(version) {
const supportInfo = prettier.getSupportInfo(version);
const languages = supportInfo.languages.reduce(
(obj, language) =>
Object.assign({ [language.name]: language.parsers }, obj),
{}
);
const options = supportInfo.options.reduce(
(obj, option) =>
Object.assign(
{
[option.name]: Object.assign(
{
type: option.type,
default: option.default
},
option.type === "int"
? { range: option.range }
const prettier = require("prettier/local");
const parsers = prettier
.getSupportInfo()
.options.find(option => option.name === "parser");
run_spec(
__dirname,
parsers.choices
.filter(choice => !choice.deprecated)
.map(choice => choice.value)
);