reactrb/reactrb

View on GitHub
lib/react/element.rb

Summary

Maintainability
A
0 mins
Test Coverage

Literal typeof #{properties} === 'undefined' appeared as a condition.
Open

      @properties = (`typeof #{properties} === 'undefined'` ? nil : properties) || {}
Severity: Minor
Found in lib/react/element.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

Unused method argument - new_block. If it's necessary, use _ or _new_block as an argument name to indicate that it won't be used.
Open

    def render(props = {}, &new_block)
Severity: Minor
Found in lib/react/element.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

There are no issues that match your filters.

Category
Status