aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/pronto/eslint_npm.rb2
-rw-r--r--spec/pronto/eslint_spec.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/pronto/eslint_npm.rb b/lib/pronto/eslint_npm.rb
index 9ff7df5..bb79091 100644
--- a/lib/pronto/eslint_npm.rb
+++ b/lib/pronto/eslint_npm.rb
@@ -4,7 +4,7 @@ require 'shellwords'
4module Pronto 4module Pronto
5 class ESLintNpm < Runner 5 class ESLintNpm < Runner
6 CONFIG_FILE = '.pronto_eslint_npm.yml'.freeze 6 CONFIG_FILE = '.pronto_eslint_npm.yml'.freeze
7 CONFIG_KEYS = %i(eslint_executable files_to_lint).freeze 7 CONFIG_KEYS = %w(eslint_executable files_to_lint).freeze
8 8
9 attr_writer :eslint_executable 9 attr_writer :eslint_executable
10 10
diff --git a/spec/pronto/eslint_spec.rb b/spec/pronto/eslint_spec.rb
index 6358621..e354ba4 100644
--- a/spec/pronto/eslint_spec.rb
+++ b/spec/pronto/eslint_spec.rb
@@ -39,7 +39,7 @@ module Pronto
39 39
40 context( 40 context(
41 'with files to lint config that never matches', 41 'with files to lint config that never matches',
42 config: { files_to_lint: 'will never match' } 42 config: { 'files_to_lint' => 'will never match' }
43 ) do 43 ) do
44 it 'returns zero errors' do 44 it 'returns zero errors' do
45 expect(run.count).to eql(0) 45 expect(run.count).to eql(0)
@@ -48,7 +48,7 @@ module Pronto
48 48
49 context( 49 context(
50 'with files to lint config that matches only .js', 50 'with files to lint config that matches only .js',
51 config: { files_to_lint: /\.js/ } 51 config: { 'files_to_lint' => /\.js/ }
52 ) do 52 ) do
53 it 'returns correct amount of errors' do 53 it 'returns correct amount of errors' do
54 expect(run.count).to eql(2) 54 expect(run.count).to eql(2)
@@ -57,7 +57,7 @@ module Pronto
57 57
58 context( 58 context(
59 'with different eslint executable', 59 'with different eslint executable',
60 config: { eslint_executable: './custom_eslint.sh' } 60 config: { 'eslint_executable' => './custom_eslint.sh' }
61 ) do 61 ) do
62 it 'calls the custom eslint eslint_executable' do 62 it 'calls the custom eslint eslint_executable' do
63 expect { run }.to raise_error(JSON::ParserError, /custom eslint called/) 63 expect { run }.to raise_error(JSON::ParserError, /custom eslint called/)