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

Upgrade eslint + flow #2083

Closed
wants to merge 12 commits into from
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

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.

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,16 @@
"cross-env": "^6.0.3",
"del": "^5.1.0",
"es6-shim": "^0.35.5",
"eslint": "^6.6.0",
"eslint": "^6.8.0",
"eslint-config-fbjs": "^3.1.1",
"eslint-config-prettier": "^6.5.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-flowtype": "^4.3.0",
"eslint-plugin-flowtype": "^4.6.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-relay": "^1.3.12",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.17.0",
"fbjs-scripts": "^1.2.0",
"flow-bin": "^0.110.1",
"flow-bin": "^0.115.0",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-clean-css": "^4.2.0",
Expand Down
4 changes: 4 additions & 0 deletions scripts/jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ module.exports = {
process(src, filename) {
var options = {
presets: [fbjsConfigurePreset({rewriteModules: {map: moduleMap}})],
plugins: [
require('@babel/plugin-proposal-nullish-coalescing-operator'),
require('@babel/plugin-proposal-optional-chaining')
],
filename: filename,
retainLines: true,
};
Expand Down
2 changes: 1 addition & 1 deletion src/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ unsafe-getters-setters
; nonstrict-import

[version]
^0.110.1
^0.115.0
2 changes: 2 additions & 0 deletions src/component/handlers/edit/editOnBlur.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function editOnBlur(editor: DraftEditor, e: SyntheticEvent<HTMLElement>): void {
// opposed to clicking to another tab or window).
const {ownerDocument} = e.currentTarget;
if (
// This ESLint rule conflicts with `sketchy-null-bool` flow check
// eslint-disable-next-line no-extra-boolean-cast
!Boolean(editor.props.preserveSelectionOnBlur) &&
getActiveElement(ownerDocument) === ownerDocument.body
) {
Expand Down
230 changes: 156 additions & 74 deletions yarn.lock

Large diffs are not rendered by default.