Bump rubocop from 0.75.0 to 0.83.0
Recent versions introduce the `Layout/SpaceAroundMethodCallOperator`, which we are going to use. We aren't upgrading to the latest rubocop version because it conflicts with the version of Capybara we're using and because it isn't supported by Hound. Some rules have been renamed: Layout/IndentAssignment is now Layout/AssignmentIndentation Layout/IndentHeredoc is now Layout/HeredocIndentation Layout/LeadingBlankLines is now Layout/LeadingEmptyLines Layout/Tab is now Layout/IndentationStyle Layout/TrailingBlankLines is now Layout/TrailingEmptyLines Lint/StringConversionInInterpolation is now Lint/RedundantStringCoercion Metrics/LineLength is now Layout/LineLength Note after upgrading we get a new "offense" in the `StartWith` rule, so we're changing the code in order to fix it.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
rubocop:
|
||||
config_file: .rubocop.yml
|
||||
version: 0.75.0
|
||||
version: 0.83.0
|
||||
scss:
|
||||
config_file: .scss-lint.yml
|
||||
erblint:
|
||||
|
||||
32
.rubocop.yml
32
.rubocop.yml
@@ -28,6 +28,9 @@ Capybara/FeatureMethods:
|
||||
FactoryBot/AttributeDefinedStatically:
|
||||
Enabled: true
|
||||
|
||||
Layout/AssignmentIndentation:
|
||||
Enabled: true
|
||||
|
||||
Layout/EmptyLineAfterGuardClause:
|
||||
Enabled: true
|
||||
|
||||
@@ -58,21 +61,25 @@ Layout/EndOfLine:
|
||||
Layout/ExtraSpacing:
|
||||
Enabled: true
|
||||
|
||||
Layout/IndentAssignment:
|
||||
Enabled: true
|
||||
|
||||
Layout/IndentHeredoc:
|
||||
Layout/HeredocIndentation:
|
||||
Enabled: true
|
||||
|
||||
Layout/IndentationConsistency:
|
||||
EnforcedStyle: indented_internal_methods
|
||||
|
||||
Layout/IndentationStyle:
|
||||
Enabled: true
|
||||
|
||||
Layout/IndentationWidth:
|
||||
Enabled: true
|
||||
|
||||
Layout/LeadingBlankLines:
|
||||
Layout/LeadingEmptyLines:
|
||||
Enabled: true
|
||||
|
||||
Layout/LineLength:
|
||||
Max: 110
|
||||
Severity: refactor
|
||||
|
||||
Layout/MultilineBlockLayout:
|
||||
Enabled: true
|
||||
|
||||
@@ -146,10 +153,7 @@ Layout/SpaceInsideReferenceBrackets:
|
||||
Layout/SpaceInsideStringInterpolation:
|
||||
Enabled: true
|
||||
|
||||
Layout/Tab:
|
||||
Enabled: true
|
||||
|
||||
Layout/TrailingBlankLines:
|
||||
Layout/TrailingEmptyLines:
|
||||
Enabled: true
|
||||
|
||||
Layout/TrailingWhitespace:
|
||||
@@ -167,22 +171,18 @@ Lint/LiteralAsCondition:
|
||||
Lint/ParenthesesAsGroupedExpression:
|
||||
Enabled: true
|
||||
|
||||
Lint/RedundantStringCoercion:
|
||||
Enabled: true
|
||||
|
||||
Lint/SafeNavigationChain:
|
||||
Enabled: true
|
||||
|
||||
Lint/ShadowingOuterLocalVariable:
|
||||
Enabled: true
|
||||
|
||||
Lint/StringConversionInInterpolation:
|
||||
Enabled: true
|
||||
|
||||
Lint/UselessAssignment:
|
||||
Enabled: true
|
||||
|
||||
Metrics/LineLength:
|
||||
Max: 110
|
||||
Severity: refactor
|
||||
|
||||
Performance/CompareWithBlock:
|
||||
Enabled: true
|
||||
|
||||
|
||||
4
Gemfile
4
Gemfile
@@ -98,8 +98,8 @@ group :development do
|
||||
gem "erb_lint", require: false
|
||||
gem "github_changelog_generator", "~> 1.15.0"
|
||||
gem "mdl", "~> 0.5.0", require: false
|
||||
gem "rubocop", "~> 0.75.0", require: false
|
||||
gem "rubocop-performance", "~> 1.4.1", require: false
|
||||
gem "rubocop", "~> 0.83.0", require: false
|
||||
gem "rubocop-performance", "~> 1.6.1", require: false
|
||||
gem "rubocop-rails", "~> 2.3.2", require: false
|
||||
gem "rubocop-rspec", "~> 1.35.0", require: false
|
||||
gem "rvm1-capistrano3", "~> 1.4.0", require: false
|
||||
|
||||
22
Gemfile.lock
22
Gemfile.lock
@@ -286,7 +286,6 @@ GEM
|
||||
railties (>= 3.1, < 6.0)
|
||||
invisible_captcha (0.10.0)
|
||||
rails (>= 3.2.0)
|
||||
jaro_winkler (1.5.3)
|
||||
jquery-fileupload-rails (0.4.7)
|
||||
actionpack (>= 3.1)
|
||||
railties (>= 3.1)
|
||||
@@ -391,10 +390,10 @@ GEM
|
||||
cocaine (~> 0.5.5)
|
||||
mime-types
|
||||
mimemagic (~> 0.3.0)
|
||||
parallel (1.17.0)
|
||||
parallel (1.19.1)
|
||||
paranoia (2.4.2)
|
||||
activerecord (>= 4.0, < 6.1)
|
||||
parser (2.6.5.0)
|
||||
parser (2.7.1.3)
|
||||
ast (~> 2.4.0)
|
||||
pg (0.21.0)
|
||||
pg_search (2.0.1)
|
||||
@@ -454,6 +453,7 @@ GEM
|
||||
actionpack (>= 4.2.0, < 6.0)
|
||||
railties (>= 4.2.0, < 6.0)
|
||||
retriable (3.1.2)
|
||||
rexml (3.2.4)
|
||||
rinku (2.0.4)
|
||||
rollbar (2.18.0)
|
||||
multi_json
|
||||
@@ -474,14 +474,14 @@ GEM
|
||||
rspec-mocks (~> 3.8.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-support (3.8.0)
|
||||
rubocop (0.75.0)
|
||||
jaro_winkler (~> 1.5.1)
|
||||
rubocop (0.83.0)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 2.6)
|
||||
parser (>= 2.7.0.1)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
rexml
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 1.7)
|
||||
rubocop-performance (1.4.1)
|
||||
unicode-display_width (>= 1.4.0, < 2.0)
|
||||
rubocop-performance (1.6.1)
|
||||
rubocop (>= 0.71.0)
|
||||
rubocop-rails (2.3.2)
|
||||
rack (>= 1.1)
|
||||
@@ -575,7 +575,7 @@ GEM
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (4.1.19)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unicode-display_width (1.6.0)
|
||||
unicode-display_width (1.7.0)
|
||||
uniform_notifier (1.13.0)
|
||||
user_agent_parser (2.6.0)
|
||||
uuidtools (2.1.5)
|
||||
@@ -676,8 +676,8 @@ DEPENDENCIES
|
||||
rinku (~> 2.0.2)
|
||||
rollbar (~> 2.18.0)
|
||||
rspec-rails (~> 3.8)
|
||||
rubocop (~> 0.75.0)
|
||||
rubocop-performance (~> 1.4.1)
|
||||
rubocop (~> 0.83.0)
|
||||
rubocop-performance (~> 1.6.1)
|
||||
rubocop-rails (~> 2.3.2)
|
||||
rubocop-rspec (~> 1.35.0)
|
||||
rvm1-capistrano3 (~> 1.4.0)
|
||||
|
||||
@@ -10,5 +10,5 @@ Ckeditor.setup do |config|
|
||||
config.assets_languages = Rails.application.config.i18n.available_locales.map { |l| l.to_s.downcase }
|
||||
config.assets_plugins = %w[image link magicline pastefromword table tableselection
|
||||
tabletools]
|
||||
config.assets.reject! { |asset| asset =~ /\Ackeditor\/samples\// }
|
||||
config.assets.reject! { |asset| asset.starts_with?("ckeditor/samples/") }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user