Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9437671

Browse files
rubocop --only Style/TrailingCommaInLiteral -a
1 parent 940f5dd commit 9437671

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

‎lib/generators/react/component_generator.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class ComponentGenerator < ::Rails::Generators::NamedBase
8686
'oneOfType' => ->(*options) {
8787
types = options.map{ |k| "#{lookup(k.to_s, k.to_s)}" }.join(',')
8888
'React.PropTypes.oneOfType([%s])' % types
89-
},
89+
}
9090
}
9191

9292
def create_component_file

‎lib/react/jsx/jsx_transformer.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class JSXTransformer
77
def initialize(options)
88
@transform_options = {
99
stripTypes: options.fetch(:strip_types, false),
10-
harmony: options.fetch(:harmony, false),
10+
harmony: options.fetch(:harmony, false)
1111
}
1212

1313
@asset_path = options.fetch(:asset_path, DEFAULT_ASSET_PATH)

‎lib/react/rails/railtie.rb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,20 @@ class Railtie < ::Rails::Railtie
7474
initializer 'react_rails.bust_cache', after: :load_config_initializers, group: :all do |app|
7575
asset_variant = React::Rails::AssetVariant.new({
7676
variant: app.config.react.variant,
77-
addons: app.config.react.addons,
77+
addons: app.config.react.addons
7878
})
7979

8080
sprockets_env = app.assets || app.config.try(:assets) # sprockets-rails 3.x attaches this at a different config
8181
unless sprockets_env.nil?
82-
sprockets_env.version = [sprockets_env.version, "react-#{asset_variant.react_build}",].compact.join('-')
82+
sprockets_env.version = [sprockets_env.version, "react-#{asset_variant.react_build}"].compact.join('-')
8383
end
8484

8585
end
8686

8787
initializer 'react_rails.set_variant', after: :engines_blank_point, group: :all do |app|
8888
asset_variant = React::Rails::AssetVariant.new({
8989
variant: app.config.react.variant,
90-
addons: app.config.react.addons,
90+
addons: app.config.react.addons
9191
})
9292

9393
if app.config.respond_to?(:assets)

‎test/react_test.rb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ def test_it_camelizes_props
88
{ double_nested: true },
99
1,
1010
'string item',
11-
[ { nested_array: {} }],
11+
[ { nested_array: {} }]
1212
]
1313
},
14-
'alreadyCamelized' => :ok,
14+
'alreadyCamelized' => :ok
1515
}
1616

1717
expected_props = {
@@ -20,7 +20,7 @@ def test_it_camelizes_props
2020
{ 'doubleNested' => true },
2121
1,
2222
'string item',
23-
[ { 'nestedArray' => {} }],
23+
[ { 'nestedArray' => {} }]
2424
]
2525
},
2626
'alreadyCamelized' => :ok

‎test/test_helper.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
inspector: true,
4444
# hide warnings from React.js whitespace changes:
4545
# and from React.createClass deprecation
46-
js_errors: false,
46+
js_errors: false
4747
}
4848
Capybara::Poltergeist::Driver.new(app, poltergeist_options)
4949
end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /