Skip to content
Merged
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: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"rules": {
"no-console": "off",
"strict": ["error", "global"]
"strict": ["error", "global"],
"curly": "warn"
}
}
4 changes: 3 additions & 1 deletion packages/react-dev-utils/ansiHTML.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ function ansiHTML(txt) {
if (color != null) {
result += '<span style="color: #' + color + ';">' + part + '</span>';
} else {
if (fg != null) console.log('Missing color mapping: ', fg);
if (fg != null) {
console.log('Missing color mapping: ', fg);
}
result += '<span>' + part + '</span>';
}
if (_index < contentParts.length - 1) {
Expand Down
5 changes: 4 additions & 1 deletion packages/react-error-overlay/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": "react-app"
"extends": "react-app",
"rules": {
"curly": "warn"
}
}
4 changes: 3 additions & 1 deletion packages/react-error-overlay/src/utils/mapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 3 additions & 1 deletion packages/react-error-overlay/src/utils/unmapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down