diff --git a/.eslintrc b/.eslintrc
index d4e6d47749e..44a504e4080 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -11,6 +11,7 @@
},
"rules": {
"no-console": "off",
- "strict": ["error", "global"]
+ "strict": ["error", "global"],
+ "curly": "warn"
}
}
diff --git a/packages/react-dev-utils/ansiHTML.js b/packages/react-dev-utils/ansiHTML.js
index 3e192e66f0f..c4e850736ac 100644
--- a/packages/react-dev-utils/ansiHTML.js
+++ b/packages/react-dev-utils/ansiHTML.js
@@ -82,7 +82,9 @@ function ansiHTML(txt) {
if (color != null) {
result += '' + part + '';
} else {
- if (fg != null) console.log('Missing color mapping: ', fg);
+ if (fg != null) {
+ console.log('Missing color mapping: ', fg);
+ }
result += '' + part + '';
}
if (_index < contentParts.length - 1) {
diff --git a/packages/react-error-overlay/.eslintrc b/packages/react-error-overlay/.eslintrc
index 5e603ecd193..9dadba0d985 100644
--- a/packages/react-error-overlay/.eslintrc
+++ b/packages/react-error-overlay/.eslintrc
@@ -1,3 +1,6 @@
{
- "extends": "react-app"
+ "extends": "react-app",
+ "rules": {
+ "curly": "warn"
+ }
}
diff --git a/packages/react-error-overlay/src/utils/mapper.js b/packages/react-error-overlay/src/utils/mapper.js
index 17a6bd1c439..3dbb642a11f 100644
--- a/packages/react-error-overlay/src/utils/mapper.js
+++ b/packages/react-error-overlay/src/utils/mapper.js
@@ -17,7 +17,9 @@ async function map(
const files: string[] = [];
frames.forEach(frame => {
const { fileName } = frame;
- if (fileName == null) return;
+ if (fileName == null) {
+ return;
+ }
if (files.indexOf(fileName) !== -1) {
return;
}
diff --git a/packages/react-error-overlay/src/utils/unmapper.js b/packages/react-error-overlay/src/utils/unmapper.js
index bf6e5917dfc..d165c249324 100644
--- a/packages/react-error-overlay/src/utils/unmapper.js
+++ b/packages/react-error-overlay/src/utils/unmapper.js
@@ -67,7 +67,9 @@ async function unmap(
}))
.sort((a, b) => {
const s = Math.sign(a.seps - b.seps);
- if (s !== 0) return s;
+ if (s !== 0) {
+ return s;
+ }
return Math.sign(a.penalties - b.penalties);
});
if (source.length < 1 || lineNumber == null) {