]> git.immae.eu Git - github/fretlink/pronto-hlint.git/commitdiff
update locally used ruby versiob, lint everything
authorMarkus Doits <markus.doits@stellenticket.de>
Fri, 30 Mar 2018 17:20:57 +0000 (19:20 +0200)
committerMarkus Doits <markus.doits@stellenticket.de>
Fri, 30 Mar 2018 17:21:22 +0000 (19:21 +0200)
.rubocop.yml
.ruby-version
Gemfile
Rakefile [changed mode: 0644->0755]
lib/pronto/eslint_npm.rb
lib/pronto/eslint_npm/version.rb
pronto-eslint_npm.gemspec
spec/pronto/eslint_spec.rb
spec/spec_helper.rb

index 33ec24887a5a3a6f97f2fa3e68ad89c4346f96cc..393726b0abd35bde655b8015a0cf8cebd2161879 100644 (file)
@@ -1,18 +1,56 @@
+---
 AllCops:
   DisplayCopNames: true
   DisplayStyleGuide: true
+  TargetRubyVersion: 2.1.0
 
 Documentation:
   Enabled: false
 
-Metrics/MethodLength:
-  Max: 20
+Layout/ExtraSpacing:
+  ForceEqualSignAlignment: true
 
-Metrics/LineLength:
-  Max: 100
+Layout/MultilineMethodCallIndentation:
+  Enabled: false
+
+Lint/AmbiguousBlockAssociation:
+  Enabled: false
 
 Metrics/AbcSize:
-  Max: 20
+  Max: 40
+
+Metrics/BlockLength:
+  Enabled: false
+
+Metrics/ClassLength:
+  Max: 200
+
+Metrics/CyclomaticComplexity:
+  Max: 15
+
+Metrics/LineLength:
+  Max: 120
+
+Metrics/MethodLength:
+  Max: 30
 
 Metrics/ParameterLists:
   Max: 10
+
+Rails:
+  Enabled: true
+
+Rails/InverseOf:
+  Enabled: false
+
+Rails/LexicallyScopedActionFilter:
+  Enabled: false
+
+Rails/SkipsModelValidations:
+  Enabled: false
+
+Rails/UnknownEnv:
+  Enabled: false
+
+Style/FormatStringToken:
+  Enabled: false
index 0bee604df761bde7de6502876b5cb0504dfa8701..73462a5a13445f66009e00988279d30e55aa8363 100644 (file)
@@ -1 +1 @@
-2.3.3
+2.5.1
diff --git a/Gemfile b/Gemfile
index fa75df15632305f9badb9a7ac0028e4b2ef4d221..7f4f5e950d1572e1ce5607ca237375aa2e30d662 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 source 'https://rubygems.org'
 
 gemspec
old mode 100644 (file)
new mode 100755 (executable)
index dfa86a6..fcf8b82
--- a/Rakefile
+++ b/Rakefile
@@ -1,4 +1,6 @@
 #!/usr/bin/env rake
+# frozen_string_literal: true
+
 require 'bundler'
 require 'rspec/core/rake_task'
 
index bb79091bb241eed32c4a77c52b239ae322f2842b..e861ffedb2459d09402b810dd5c22c1a0bfbe0f5 100644 (file)
@@ -1,15 +1,17 @@
+# frozen_string_literal: true
+
 require 'pronto'
 require 'shellwords'
 
 module Pronto
   class ESLintNpm < Runner
     CONFIG_FILE = '.pronto_eslint_npm.yml'.freeze
-    CONFIG_KEYS = %w(eslint_executable files_to_lint).freeze
+    CONFIG_KEYS = %w[eslint_executable files_to_lint].freeze
 
     attr_writer :eslint_executable
 
     def eslint_executable
-      @eslint_executable || 'eslint'.freeze
+      @eslint_executable || 'eslint'
     end
 
     def files_to_lint
@@ -61,7 +63,7 @@ module Pronto
     end
 
     def new_message(offence, line)
-      path = line.patch.delta.new_file[:path]
+      path  = line.patch.delta.new_file[:path]
       level = :warning
 
       Message.new(path, line, level, offence['message'], nil, self.class)
index c22ce28942cec0e90b4e23cb719de04c80e3076a..2d3f9d86ff337ece529ccb70d60f0d7c07089bc8 100644 (file)
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 module Pronto
   module ESLintNpmVersion
     VERSION = '0.9.0'.freeze
index d3e3b654e87724358fef61de5ccadcdb1fa07e6a..23046789b3fc30a2522fcb3c2668691a59715f1d 100644 (file)
@@ -1,29 +1,29 @@
-# -*- encoding: utf-8 -*-
+# frozen_string_literal: true
 
-$LOAD_PATH.push File.expand_path('../lib', __FILE__)
+$LOAD_PATH.push File.expand_path('lib', __dir__)
 require 'pronto/eslint_npm/version'
 
 Gem::Specification.new do |s|
-  s.name = 'pronto-eslint_npm'
-  s.version = Pronto::ESLintNpmVersion::VERSION
+  s.name     = 'pronto-eslint_npm'
+  s.version  = Pronto::ESLintNpmVersion::VERSION
   s.platform = Gem::Platform::RUBY
-  s.authors = ['Markus Doits', 'Mindaugas Mozūras']
-  s.email = 'markus.doits@gmail.com'
+  s.authors  = ['Markus Doits', 'Mindaugas Mozūras']
+  s.email    = 'markus.doits@gmail.com'
   s.homepage = 'https://github.com/doits/pronto-eslint_npm'
-  s.summary = <<-EOF
+  s.summary  = <<-EOF
     Pronto runner for ESLint, pluggable linting utility for JavaScript and JSX
   EOF
 
-  s.licenses = ['MIT']
+  s.licenses              = ['MIT']
   s.required_ruby_version = '>= 2.0.0'
 
-  s.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(lib/|(LICENSE|README.md)$)}) }
+  s.files            = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(lib/|(LICENSE|README.md)$)}) }
   s.extra_rdoc_files = ['LICENSE', 'README.md']
-  s.require_paths = ['lib']
+  s.require_paths    = ['lib']
   s.requirements << 'eslint (in PATH)'
 
   s.add_dependency('pronto', '~> 0.9.1')
+  s.add_development_dependency('byebug', '>= 9')
   s.add_development_dependency('rake', '>= 11.0', '< 13')
   s.add_development_dependency('rspec', '~> 3.4')
-  s.add_development_dependency('byebug', '>= 9')
 end
index b0b9c22d11bb5fc7788949b2fc4447b36c71730b..52e52f2db6f004b145a21577c0c18ffb3c011589 100644 (file)
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'spec_helper'
 
 module Pronto
index c13fe98e8cc9f0be2e677cf65cb7917a2fd0ba91..b3d85969215cd4beaff60c71a8a47755ff961db0 100644 (file)
@@ -1,9 +1,11 @@
+# frozen_string_literal: true
+
 require 'fileutils'
 require 'byebug'
 require 'rspec'
 require 'pronto/eslint_npm'
 
-%w(test eslintignore).each do |repo_name|
+%w[test eslintignore].each do |repo_name|
   RSpec.shared_context "#{repo_name} repo" do
     let(:git) { "spec/fixtures/#{repo_name}.git/git" }
     let(:dot_git) { "spec/fixtures/#{repo_name}.git/.git" }