codeclimate/codeclimate-duplication

View on GitHub
lib/cc/engine/analyzers/typescript/main.rb

Summary

Maintainability
A
0 mins
Test Coverage

Do not freeze immutable objects, as freezing them has no effect.
Open

          REQUEST_PATH = "/typescript".freeze

This cop check for uses of Object#freeze on immutable objects.

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

Do not place comments on the same line as the module keyword.
Open

      module TypeScript # TODO: inconsistent naming w/ Javascript

This cop checks for comments put on the same line as some keywords. These keywords are: begin, class, def, end, module.

Note that some comments (such as :nodoc: and rubocop:disable) are allowed.

Example:

# bad
if condition
  statement
end # end if

# bad
class X # comment
  statement
end

# bad
def x; end # comment

# good
if condition
  statement
end

# good
class X # :nodoc:
  y
end

Avoid comma after the last item of an array.
Open

            "**/*.tsx",

This cop checks for trailing comma in array and hash literals.

Example: EnforcedStyleForMultiline: consistent_comma

# bad
a = [1, 2,]

# good
a = [
  1, 2,
  3,
]

# good
a = [
  1,
  2,
]

Example: EnforcedStyleForMultiline: comma

# bad
a = [1, 2,]

# good
a = [
  1,
  2,
]

Example: EnforcedStyleForMultiline: no_comma (default)

# bad
a = [1, 2,]

# good
a = [
  1,
  2
]

There are no issues that match your filters.

Category
Status