blob: bc6bedb8ba17d29ba660fef923c1a2b5d41b6be2 [file] [log] [blame]
Kai Ninomiya8f57bd62019-10-25 14:50:37 -07001module.exports = function (api) {
Kai Ninomiyae43fd9e2019-08-15 13:43:56 -07002 api.cache(true);
3 return {
4 presets: ['@babel/preset-typescript'],
5 plugins: [
6 '@babel/plugin-proposal-class-properties',
Kai Ninomiyadc98c8d2020-01-06 19:36:00 -08007 'const-enum',
Kai Ninomiyae43fd9e2019-08-15 13:43:56 -07008 [
9 'add-header-comment',
10 {
11 header: ['AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts'],
12 },
13 ],
14 ],
15 compact: false,
Kai Ninomiyaad7831f2020-06-09 18:22:08 -070016 retainLines: true, // Keeps code *and comments* on ~the same line as in the source
17 shouldPrintComment: val => !/eslint|prettier-ignore/.test(val),
Kai Ninomiyae43fd9e2019-08-15 13:43:56 -070018 };
19};