reactrb/reactrb

View on GitHub
lib/react/component/api.rb

Summary

Maintainability
A
0 mins
Test Coverage

Literal typeof ReactDOM === 'undefined' || typeof ReactDOM.findDOMNode === 'undefined' appeared as a condition.
Open

        if !(`typeof ReactDOM === 'undefined' || typeof ReactDOM.findDOMNode === 'undefined'`)
Severity: Minor
Found in lib/react/component/api.rb by rubocop

This cop checks for literals used as the conditions or as operands in and/or expressions serving as the conditions of if/while/until.

Example:

# bad

if 20
  do_something
end

Example:

# bad

if some_var && true
  do_something
end

Example:

# good

if some_var && some_condition
  do_something
end

Literal typeof React.findDOMNode === 'undefined' appeared as a condition.
Open

        elsif !(`typeof React.findDOMNode === 'undefined'`)
Severity: Minor
Found in lib/react/component/api.rb by rubocop

This cop checks for literals used as the conditions or as operands in and/or expressions serving as the conditions of if/while/until.

Example:

# bad

if 20
  do_something
end

Example:

# bad

if some_var && true
  do_something
end

Example:

# good

if some_var && some_condition
  do_something
end

There are no issues that match your filters.

Category
Status