mirror-webgpu-cts/babel.config.js

22 lines
629 B
JavaScript
Raw Permalink Normal View History

module.exports = function (api) {
2019-08-15 12:43:56 -08:00
api.cache(true);
return {
presets: ['@babel/preset-typescript'],
plugins: [
'const-enum',
2019-08-15 12:43:56 -08:00
[
'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),
2019-08-15 12:43:56 -08:00
};
};