mirror-webgpu-cts/babel.config.js
Kai Ninomiya f25e6ca1d7
Remove babel transforms for ?? .? &&= ||= (#470)
These are supported natively in the latest versions of the major browsers.
Cleans up the generated code a bit.
2021-02-23 22:21:39 -08:00

21 lines
629 B
JavaScript

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),
};
};