ManageIQ/manageiq-ui-classic

View on GitHub
app/javascript/components/miq_debug/index.jsx

Summary

Maintainability
A
35 mins
Test Coverage

Showing 15 of 15 total issues

Function onerror has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

window.onerror = function(msg, url, lineNo, columnNo, error) {
Severity: Minor
Found in app/javascript/components/miq_debug/index.jsx - About 35 mins to fix

Unary operator '++' used.
Open

key: state.keyCounter++,

Expected to return a value at the end of function.
Open

const debug_toast = function(type, data) {

Unexpected function expression.
Open

Object.keys(orig).forEach(function(key) {

Use the rest parameters instead of 'arguments'.
Open

orig[key].apply(window.console, arguments);

Unexpected function expression.
Open

window.addEventListener('error', function(ev) {

Expected a line break before this closing brace.
Open

const render = ({ items, clear, remove, disable }) => {

Expected a line break after this opening brace.
Open

const render = ({ items, clear, remove, disable }) => {

Expected property shorthand.
Open

error: error,

Use the rest parameters instead of 'arguments'.
Open

debug_toast(key, Array.from(arguments));

Expected property shorthand.
Open

columnNo: columnNo,

Unexpected parentheses around single function argument having a body with no curly braces.
Open

state.items = state.items.filter((i) => i !== item);

Identifier 'debug_toast' is not in camel case.
Open

const debug_toast = function(type, data) {

Expected property shorthand.
Open

url: url,

Expected property shorthand.
Open

lineNo: lineNo,
Category
Status