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

Adds support for nullish coalescing operator #2076

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["@babel/plugin-proposal-nullish-coalescing-operator"]
}
2 changes: 2 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var babelOptsJS = {
rewriteModules: {map: moduleMap},
}),
],
plugins: [require('@babel/plugin-proposal-nullish-coalescing-operator')],
};

var babelOptsFlow = {
Expand All @@ -57,6 +58,7 @@ var babelOptsFlow = {
rewriteModules: {map: moduleMap},
}),
],
plugins: [require('@babel/plugin-proposal-nullish-coalescing-operator')],
};

var COPYRIGHT_HEADER = `/**
Expand Down
2 changes: 1 addition & 1 deletion meta/bundle-size-stats/Draft.js.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion meta/bundle-size-stats/Draft.min.js.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@
},
"devDependencies": {
"@babel/core": "^7.3.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"babel-eslint": "^8.1.1",
"babel-preset-fbjs": "^3.2.0",
"cross-env": "^5.1.3",
"del": "^2.2.0",
"envify": "^3.4.0",
"es6-shim": "^0.34.4",
"eslint": "^4.2.0",
"eslint": "^5.16.0",
"eslint-config-fbjs": "^2.0.0",
"eslint-config-prettier": "^2.6.0",
"eslint-plugin-babel": "^4.1.1",
Expand Down
1 change: 1 addition & 0 deletions src/model/immutable/ContentBlockNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const decorateCharacterList = (
class ContentBlockNode extends (Record(defaultRecord): any)
implements BlockNode {
constructor(props: ContentBlockNodeConfig = defaultRecord) {
/* eslint-disable-next-line constructor-super */
super(decorateCharacterList(props));
}

Expand Down
Loading