Showing 2,591 of 2,591 total issues
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Open
import auth from './reducers/auth';
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Open
export const HumanizeObjectType = (type) => {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Open
export const FileToBase64 = (file) => {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Open
export const ConstructTypeFromObjectType = (type) => {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Open
import { combineReducers } from "redux";
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Open
export const ObjectColour = (type) => {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Open
export function register(config) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Open
export default convertToHHMM;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Open
import { include } from 'named-urls'
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Open
import { merge, isObject } from 'lodash';
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Use Kernel#loop
with break
rather than begin/end/until
(or while
). Open
end while iterator.to_i != 0
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for uses of begin...end while/until something.
Example:
# bad
# using while
begin
do_something
end while some_condition
Example:
# bad
# using until
begin
do_something
end until some_condition
Example:
# good
# using while
while some_condition
do_something
end
Example:
# good
# using until
until some_condition
do_something
end
Unused block argument - code_list_id
. If it's necessary, use _
or _code_list_id
as an argument name to indicate that it won't be used. Open
json.array! @object.response_domain_codes.group_by(&:code_list_id) do | code_list_id, rds|
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for unused block arguments.
Example:
# bad
do_something do |used, unused|
puts used
end
do_something do |bar|
puts :foo
end
define_method(:foo) do |bar|
puts :baz
end
Example:
#good
do_something do |used, _unused|
puts used
end
do_something do
puts :foo
end
define_method(:foo) do |_bar|
puts :baz
end
Unused method argument - resource
. If it's necessary, use _
or _resource
as an argument name to indicate that it won't be used. You can also write as after_confirmation_path_for(*)
if you want the method to accept any arguments but don't care about them. Open
def after_confirmation_path_for(resource_name, resource)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Useless assignment to variable - qis
. Open
qis = i.db_question_items
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for every useless assignment to local variable in every
scope.
The basic idea for this cop was from the warning of ruby -cw
:
assigned but unused variable - foo
Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.
Example:
# bad
def some_method
some_var = 1
do_something
end
Example:
# good
def some_method
some_var = 1
do_something(some_var)
end
Useless assignment to variable - ccs
. Open
ccs = {}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for every useless assignment to local variable in every
scope.
The basic idea for this cop was from the warning of ruby -cw
:
assigned but unused variable - foo
Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.
Example:
# bad
def some_method
some_var = 1
do_something
end
Example:
# good
def some_method
some_var = 1
do_something(some_var)
end
Unused method argument - resource_name
. If it's necessary, use _
or _resource_name
as an argument name to indicate that it won't be used. You can also write as after_confirmation_path_for(*)
if you want the method to accept any arguments but don't care about them. Open
def after_confirmation_path_for(resource_name, resource)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Useless assignment to variable - qis
. Open
qis = i.ro_question_items
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for every useless assignment to local variable in every
scope.
The basic idea for this cop was from the warning of ruby -cw
:
assigned but unused variable - foo
Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.
Example:
# bad
def some_method
some_var = 1
do_something
end
Example:
# good
def some_method
some_var = 1
do_something(some_var)
end
Unused block argument - i
. If it's necessary, use _
or _i
as an argument name to indicate that it won't be used. Open
variables = variables.group_by{|v| v['id']}.map do | i, grouped_variables |
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for unused block arguments.
Example:
# bad
do_something do |used, unused|
puts used
end
do_something do |bar|
puts :foo
end
define_method(:foo) do |bar|
puts :baz
end
Example:
#good
do_something do |used, _unused|
puts used
end
do_something do
puts :foo
end
define_method(:foo) do |_bar|
puts :baz
end
Unreachable code detected. Open
raise Pundit::NotAuthorizedError, "must be logged in" unless user
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for unreachable code. The check are based on the presence of flow of control statement in non-final position in begin(implicit) blocks.
Example:
# bad
def some_method
return
do_something
end
# bad
def some_method
if cond
return
else
return
end
do_something
end
Example:
# good
def some_method
do_something
end
Unused block argument - index
. If it's necessary, use _
or _index
as an argument name to indicate that it won't be used. Open
new_rds.each_with_index do |new_rd, index|
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for unused block arguments.
Example:
# bad
do_something do |used, unused|
puts used
end
do_something do |bar|
puts :foo
end
define_method(:foo) do |bar|
puts :baz
end
Example:
#good
do_something do |used, _unused|
puts used
end
do_something do
puts :foo
end
define_method(:foo) do |_bar|
puts :baz
end