diff --git a/keyserver/.babelrc.cjs b/keyserver/.babelrc.cjs index 7e1013f6f..88e8d481a 100644 --- a/keyserver/.babelrc.cjs +++ b/keyserver/.babelrc.cjs @@ -1,36 +1,39 @@ module.exports = { - presets: ['@babel/preset-react', '@babel/preset-flow'], + presets: [ + ['@babel/preset-react', { runtime: 'automatic' }], + '@babel/preset-flow' + ], plugins: [ '@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-object-rest-spread', '@babel/plugin-syntax-dynamic-import', '@babel/plugin-proposal-optional-chaining', '@babel/plugin-transform-private-methods', '@babel/plugin-proposal-nullish-coalescing-operator', ['@babel/plugin-transform-runtime', { useESModules: true }], ], env: { test: { presets: [ [ '@babel/preset-env', { targets: { node: 'current', }, }, ], ], plugins: [ // Replace the import.meta object in the Jest testing environment. // This allows Jest to understand import.meta.url in rust-node-addon. [ 'babel-plugin-transform-import-meta', { replaceWith: '({ url: __filename })', }, ], ], }, }, }; diff --git a/keyserver/.flowconfig b/keyserver/.flowconfig index dcebecf7e..ff7ac706a 100644 --- a/keyserver/.flowconfig +++ b/keyserver/.flowconfig @@ -1,45 +1,47 @@ [ignore] /dist /node_modules/google-gax/node_modules/grpc/node_modules/protobufjs/src/bower.json .*/node_modules/protobufjs/src/bower.json .*/web/flow-typed [include] ../landing ../lib ../web [libs] ../lib/flow-typed ../web/flow-typed [options] enums=true module.file_ext=.js module.file_ext=.cjs module.file_ext=.json exact_by_default=true format.bracket_spacing=false +react.runtime=automatic + [lints] sketchy-null-number=warn sketchy-null-mixed=warn sketchy-number=warn untyped-type-import=error nonstrict-import=error deprecated-type=error unsafe-getters-setters=warn unnecessary-invariant=warn unused-promise=error [strict] deprecated-type nonstrict-import sketchy-null unclear-type unsafe-getters-setters untyped-import untyped-type-import