Skip to content

Commit

Permalink
Fix flag naming
Browse files Browse the repository at this point in the history
  • Loading branch information
iansu committed Oct 23, 2020
1 parent 23848c4 commit b70cb5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/babel-preset-react-app/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

const path = require('path');

const useJsxRuntime = process.env.DISABLE_NEW_JSX_TRANSFORM !== 'true';
const useJsxTransform = process.env.DISABLE_NEW_JSX_TRANSFORM !== 'true';

const validateBoolOption = (name, value, defaultValue) => {
if (typeof value === 'undefined') {
Expand Down Expand Up @@ -97,8 +97,8 @@ module.exports = function (api, opts, env) {
development: isEnvDevelopment || isEnvTest,
// Will use the native built-in instead of trying to polyfill
// behavior for any plugins that require one.
...(!useJsxRuntime ? { useBuiltIns: true } : {}),
runtime: useJsxRuntime ? 'automatic' : 'classic',
...(!useJsxTransform ? { useBuiltIns: true } : {}),
runtime: useJsxTransform ? 'automatic' : 'classic',
},
],
isTypeScriptEnabled && [require('@babel/preset-typescript').default],
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-react-app/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// React App support, and is used as the `baseConfig` for `eslint-loader`
// to ensure that user-provided configs don't need this boilerplate.

const useJsxRuntime = process.env.DISABLE_NEW_JSX_RUNTIME !== 'true';
const useJsxTransform = process.env.DISABLE_NEW_JSX_TRANSFORM !== 'true';

module.exports = {
root: true,
Expand Down Expand Up @@ -45,7 +45,7 @@ module.exports = {
rules: {
'react/jsx-uses-vars': 'warn',
'react/jsx-uses-react': 'warn',
...(!useJsxRuntime && {
...(!useJsxTransform && {
'react/react-in-jsx-scope': 'error',
}),
},
Expand Down

0 comments on commit b70cb5d

Please sign in to comment.