diff options
author | Markus Doits <markus.doits@stellenticket.de> | 2018-03-30 19:20:57 +0200 |
---|---|---|
committer | Markus Doits <markus.doits@stellenticket.de> | 2018-03-30 19:21:22 +0200 |
commit | 0ab4d181c9d2e1ad9e3d4028223f947599781351 (patch) | |
tree | 67e9d93bcd40527750faa788fa14946d24be5a2e /lib | |
parent | 4a987577795e16e2d477207b8edb124b0716ce1c (diff) | |
download | pronto-hlint-0ab4d181c9d2e1ad9e3d4028223f947599781351.tar.gz pronto-hlint-0ab4d181c9d2e1ad9e3d4028223f947599781351.tar.zst pronto-hlint-0ab4d181c9d2e1ad9e3d4028223f947599781351.zip |
update locally used ruby versiob, lint everything
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pronto/eslint_npm.rb | 8 | ||||
-rw-r--r-- | lib/pronto/eslint_npm/version.rb | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/pronto/eslint_npm.rb b/lib/pronto/eslint_npm.rb index bb79091..e861ffe 100644 --- a/lib/pronto/eslint_npm.rb +++ b/lib/pronto/eslint_npm.rb | |||
@@ -1,15 +1,17 @@ | |||
1 | # frozen_string_literal: true | ||
2 | |||
1 | require 'pronto' | 3 | require 'pronto' |
2 | require 'shellwords' | 4 | require 'shellwords' |
3 | 5 | ||
4 | module Pronto | 6 | module Pronto |
5 | class ESLintNpm < Runner | 7 | class ESLintNpm < Runner |
6 | CONFIG_FILE = '.pronto_eslint_npm.yml'.freeze | 8 | CONFIG_FILE = '.pronto_eslint_npm.yml'.freeze |
7 | CONFIG_KEYS = %w(eslint_executable files_to_lint).freeze | 9 | CONFIG_KEYS = %w[eslint_executable files_to_lint].freeze |
8 | 10 | ||
9 | attr_writer :eslint_executable | 11 | attr_writer :eslint_executable |
10 | 12 | ||
11 | def eslint_executable | 13 | def eslint_executable |
12 | @eslint_executable || 'eslint'.freeze | 14 | @eslint_executable || 'eslint' |
13 | end | 15 | end |
14 | 16 | ||
15 | def files_to_lint | 17 | def files_to_lint |
@@ -61,7 +63,7 @@ module Pronto | |||
61 | end | 63 | end |
62 | 64 | ||
63 | def new_message(offence, line) | 65 | def new_message(offence, line) |
64 | path = line.patch.delta.new_file[:path] | 66 | path = line.patch.delta.new_file[:path] |
65 | level = :warning | 67 | level = :warning |
66 | 68 | ||
67 | Message.new(path, line, level, offence['message'], nil, self.class) | 69 | Message.new(path, line, level, offence['message'], nil, self.class) |
diff --git a/lib/pronto/eslint_npm/version.rb b/lib/pronto/eslint_npm/version.rb index c22ce28..2d3f9d8 100644 --- a/lib/pronto/eslint_npm/version.rb +++ b/lib/pronto/eslint_npm/version.rb | |||
@@ -1,3 +1,5 @@ | |||
1 | # frozen_string_literal: true | ||
2 | |||
1 | module Pronto | 3 | module Pronto |
2 | module ESLintNpmVersion | 4 | module ESLintNpmVersion |
3 | VERSION = '0.9.0'.freeze | 5 | VERSION = '0.9.0'.freeze |