Kai Ninomiya | 8f57bd6 | 2019-10-25 14:50:37 -0700 | [diff] [blame] | 1 | module.exports = function (api) { |
Kai Ninomiya | e43fd9e | 2019-08-15 13:43:56 -0700 | [diff] [blame] | 2 | api.cache(true); |
| 3 | return { |
| 4 | presets: ['@babel/preset-typescript'], |
| 5 | plugins: [ |
| 6 | '@babel/plugin-proposal-class-properties', |
Kai Ninomiya | dc98c8d | 2020-01-06 19:36:00 -0800 | [diff] [blame] | 7 | 'const-enum', |
Kai Ninomiya | e43fd9e | 2019-08-15 13:43:56 -0700 | [diff] [blame] | 8 | [ |
| 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 Ninomiya | ad7831f | 2020-06-09 18:22:08 -0700 | [diff] [blame^] | 16 | retainLines: true, // Keeps code *and comments* on ~the same line as in the source |
| 17 | shouldPrintComment: val => !/eslint|prettier-ignore/.test(val), |
Kai Ninomiya | e43fd9e | 2019-08-15 13:43:56 -0700 | [diff] [blame] | 18 | }; |
| 19 | }; |