File: disable-prettier.diff

package info (click to toggle)
node-jest 29.6.2~ds1%2B~cs73.45.28-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,104 kB
  • sloc: javascript: 21,649; makefile: 47; sh: 21
file content (39 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Description: disable prettier
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2022-04-27

--- a/scripts/build.mjs
+++ b/scripts/build.mjs
@@ -24,7 +24,6 @@
 import glob from 'glob';
 import fs from 'graceful-fs';
 import micromatch from 'micromatch';
-import prettier from 'prettier';
 import transformOptions from '../babel.config.js';
 import {
   OK,
@@ -42,12 +41,6 @@
 const INLINE_REQUIRE_EXCLUDE_LIST =
   /packages\/expect|(jest-(circus|diff|get-type|jasmine2|matcher-utils|message-util|regex-util|snapshot))|pretty-format\//;
 
-const prettierConfig = prettier.resolveConfig.sync(
-  fileURLToPath(import.meta.url),
-);
-prettierConfig.trailingComma = 'none';
-prettierConfig.parser = 'babel';
-
 function getPackageName(file) {
   return path.relative(PACKAGES_DIR, file).split(path.sep)[0];
 }
@@ -131,9 +124,8 @@
     }
 
     const transformed = babel.transformFileSync(file, options).code;
-    const prettyCode = prettier.format(transformed, prettierConfig);
 
-    fs.writeFileSync(destPath, prettyCode);
+    fs.writeFileSync(destPath, transformed);
 
     silent ||
       process.stdout.write(