Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 96c7221

Browse files
Claudio Procidafacebook-github-bot
authored andcommitted
Adds support for nullish coalescing operator (#2076)
Summary: **Summary** Adds support for nullish coalescing operator which was missing from the babel config of the OSS repo. **Test Plan** `yarn` Verify Travis CI tests pass Pull Request resolved: #2076 Differential Revision: D15781518 Pulled By: claudiopro fbshipit-source-id: 4d6deb3503dfbbcf142a8dbaa10ebc2ec8e7a1c4
1 parent 23fc70f commit 96c7221

File tree

7 files changed

+244
-219
lines changed

7 files changed

+244
-219
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["@babel/plugin-proposal-nullish-coalescing-operator"]
3+
}

gulpfile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ var babelOptsJS = {
4848
rewriteModules: {map: moduleMap},
4949
}),
5050
],
51+
plugins: [require('@babel/plugin-proposal-nullish-coalescing-operator')],
5152
};
5253

5354
var babelOptsFlow = {
@@ -57,6 +58,7 @@ var babelOptsFlow = {
5758
rewriteModules: {map: moduleMap},
5859
}),
5960
],
61+
plugins: [require('@babel/plugin-proposal-nullish-coalescing-operator')],
6062
};
6163

6264
var COPYRIGHT_HEADER = `/**

meta/bundle-size-stats/Draft.js.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

meta/bundle-size-stats/Draft.min.js.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@
4242
},
4343
"devDependencies": {
4444
"@babel/core": "^7.3.4",
45+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
4546
"babel-eslint": "^8.1.1",
4647
"babel-preset-fbjs": "^3.2.0",
4748
"cross-env": "^5.1.3",
4849
"del": "^2.2.0",
4950
"envify": "^3.4.0",
5051
"es6-shim": "^0.34.4",
51-
"eslint": "^4.2.0",
52+
"eslint": "^5.16.0",
5253
"eslint-config-fbjs": "^2.0.0",
5354
"eslint-config-prettier": "^2.6.0",
5455
"eslint-plugin-babel": "^4.1.1",

src/model/immutable/ContentBlockNode.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ const decorateCharacterList = (
7979
class ContentBlockNode extends (Record(defaultRecord): any)
8080
implements BlockNode {
8181
constructor(props: ContentBlockNodeConfig = defaultRecord) {
82+
/* eslint-disable-next-line constructor-super */
8283
super(decorateCharacterList(props));
8384
}
8485

0 commit comments

Comments
 (0)