blob: ad977bc510ee91925d3d8040ba806e0c48126bab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
module.exports = function (api) {
api.cache(true);
return {
presets: ['@babel/preset-typescript'],
plugins: [
'const-enum',
[
'add-header-comment',
{
header: ['AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts'],
},
],
],
compact: false,
// Keeps comments from getting hoisted to the end of the previous line of code.
// (Also keeps lines close to their original line numbers - but for WPT we
// reformat with prettier anyway.)
retainLines: true,
shouldPrintComment: val => !/eslint|prettier-ignore/.test(val),
};
};
|