prettier is not packaged, so we will skip it

Forwarded: not-needed
Reviewed-By: Xavier Guimard <yadd@debian.org>
Last-Update: 2020-11-28

Gbp-Pq: Name skip-prettier.patch
This commit is contained in:
Debian Javascript Maintainers 2022-05-19 14:59:03 +08:00 committed by openKylinBot
parent 5fe973dfaf
commit e81f4a323c
1 changed files with 1 additions and 7 deletions

View File

@ -9,14 +9,8 @@ if (process.env.CI && parseInt(process.versions.node, 10) < 10) {
return code;
};
} else {
const prettier = require("prettier");
module.exports = function formatCode(code, filename) {
filename = filename || __filename;
const prettierConfig = prettier.resolveConfig.sync(filename);
prettierConfig.filepath = filename;
prettierConfig.parser = filename.endsWith(".ts") ? "babel-ts" : "babel";
return prettier.format(code, prettierConfig);
return code;
};
}