Skip to content

Commit 4f71f25

Browse files
authored
Re-enable shorthand CSS property collision warning (#18002)
Originally added in #14181; disabled in #14245. Intention was to enable it in React 16.7 but we forgot.
1 parent e05dedc commit 4f71f25

8 files changed

Lines changed: 7 additions & 10 deletions

packages/react-dom/src/__tests__/ReactDOMShorthandCSSPropertyCollision-test.internal.js renamed to packages/react-dom/src/__tests__/ReactDOMShorthandCSSPropertyCollision-test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@
1010
'use strict';
1111

1212
describe('ReactDOMShorthandCSSPropertyCollision',()=>{
13-
letReactFeatureFlags;
1413
letReact;
1514
letReactDOM;
1615

1716
beforeEach(()=>{
1817
jest.resetModules();
19-
ReactFeatureFlags=require('shared/ReactFeatureFlags');
20-
ReactFeatureFlags.warnAboutShorthandPropertyCollision=true;
2118
React=require('react');
2219
ReactDOM=require('react-dom');
2320
});

‎packages/shared/ReactFeatureFlags.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const disableJavaScriptURLs = false;
4848
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
4949
exportconstexposeConcurrentModeAPIs=__EXPERIMENTAL__;
5050

51-
exportconstwarnAboutShorthandPropertyCollision=false;
51+
exportconstwarnAboutShorthandPropertyCollision=true;
5252

5353
// Experimental React Flare event system and event components support.
5454
exportconstenableDeprecatedFlareAPI=false;

‎packages/shared/forks/ReactFeatureFlags.native-fb.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const enableSuspenseServerRenderer = false;
2525
exportconstenableSelectiveHydration=false;
2626
exportconstenableChunksAPI=false;
2727
exportconstexposeConcurrentModeAPIs=__EXPERIMENTAL__;
28-
exportconstwarnAboutShorthandPropertyCollision=false;
28+
exportconstwarnAboutShorthandPropertyCollision=true;
2929
exportconstenableSchedulerDebugging=false;
3030
exportconstdebugRenderPhaseSideEffectsForStrictMode=true;
3131
exportconstdisableJavaScriptURLs=false;

‎packages/shared/forks/ReactFeatureFlags.native-oss.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const enableChunksAPI = false;
2424
exportconstdisableJavaScriptURLs=false;
2525
exportconstdisableInputAttributeSyncing=false;
2626
exportconstexposeConcurrentModeAPIs=__EXPERIMENTAL__;
27-
exportconstwarnAboutShorthandPropertyCollision=false;
27+
exportconstwarnAboutShorthandPropertyCollision=true;
2828
exportconstenableSchedulerDebugging=false;
2929
exportconstenableDeprecatedFlareAPI=false;
3030
exportconstenableFundamentalAPI=false;

‎packages/shared/forks/ReactFeatureFlags.persistent.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const enableChunksAPI = false;
2424
exportconstdisableJavaScriptURLs=false;
2525
exportconstdisableInputAttributeSyncing=false;
2626
exportconstexposeConcurrentModeAPIs=__EXPERIMENTAL__;
27-
exportconstwarnAboutShorthandPropertyCollision=false;
27+
exportconstwarnAboutShorthandPropertyCollision=true;
2828
exportconstenableSchedulerDebugging=false;
2929
exportconstenableDeprecatedFlareAPI=false;
3030
exportconstenableFundamentalAPI=false;

‎packages/shared/forks/ReactFeatureFlags.test-renderer.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const enableChunksAPI = false;
2424
exportconstdisableJavaScriptURLs=false;
2525
exportconstdisableInputAttributeSyncing=false;
2626
exportconstexposeConcurrentModeAPIs=__EXPERIMENTAL__;
27-
exportconstwarnAboutShorthandPropertyCollision=false;
27+
exportconstwarnAboutShorthandPropertyCollision=true;
2828
exportconstenableSchedulerDebugging=false;
2929
exportconstenableDeprecatedFlareAPI=false;
3030
exportconstenableFundamentalAPI=false;

‎packages/shared/forks/ReactFeatureFlags.testing.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const enableChunksAPI = false;
2424
exportconstdisableJavaScriptURLs=false;
2525
exportconstdisableInputAttributeSyncing=false;
2626
exportconstexposeConcurrentModeAPIs=__EXPERIMENTAL__;
27-
exportconstwarnAboutShorthandPropertyCollision=false;
27+
exportconstwarnAboutShorthandPropertyCollision=true;
2828
exportconstenableSchedulerDebugging=false;
2929
exportconstenableDeprecatedFlareAPI=false;
3030
exportconstenableFundamentalAPI=false;

‎packages/shared/forks/ReactFeatureFlags.www.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const {
1616
disableInputAttributeSyncing,
1717
enableTrustedTypesIntegration,
1818
deferPassiveEffectCleanupDuringUnmount,
19+
warnAboutShorthandPropertyCollision,
1920
}=require('ReactFeatureFlags');
2021

2122
// In www, we have experimental support for gathering data
@@ -32,7 +33,6 @@ export const enableSchedulerDebugging = true;
3233

3334
exportconstreplayFailedUnitOfWorkWithInvokeGuardedCallback=false;
3435
exportconstwarnAboutDeprecatedLifecycles=true;
35-
exportconstwarnAboutShorthandPropertyCollision=false;
3636
exportconstdisableLegacyContext=false;
3737
exportconstwarnAboutStringRefs=false;
3838
exportconstwarnAboutDefaultPropsOnFunctionComponents=false;

0 commit comments

Comments
 (0)