codeclimate/codeclimate-duplication

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

Summary

Maintainability
A
0 mins
Test Coverage

Avoid comma after the last item of an array.
Open

            "(Program _ ___)".freeze,

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
]

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

            "(NUKE ___)".freeze,

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

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

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

            "(Program _ ___)".freeze,

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

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

Avoid comma after the last item of an array.
Open

            "(VariableDeclarator _ (init (CallExpression (_ (Identifier require)) ___)))".freeze,

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
]

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

            "(VariableDeclarator _ (init (CallExpression (_ (Identifier require)) ___)))".freeze,

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

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

Avoid comma after the last item of an array.
Open

            "**/*.jsx",

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
]

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

          REQUEST_PATH = "/javascript".freeze

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

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

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

            "(directives (Directive (value (DirectiveLiteral ___))))".freeze,

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

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

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

            "(ImportDeclaration ___)".freeze,

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

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

There are no issues that match your filters.

Category
Status