From 347e6ab774cd401e437450fc93504b78bf90d748 Mon Sep 17 00:00:00 2001 From: Markus Doits Date: Sat, 9 Apr 2016 13:57:40 +0200 Subject: add es6 suffix to lint --- lib/pronto/eslint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pronto/eslint.rb b/lib/pronto/eslint.rb index b6ccff1..0de31b2 100644 --- a/lib/pronto/eslint.rb +++ b/lib/pronto/eslint.rb @@ -30,7 +30,7 @@ module Pronto end def js_file?(path) - File.extname(path) == '.js' + %w(.js .es6).include? File.extname(path) end end end -- cgit v1.2.3 From e96fd240c5911e18f43c62b20ae5f18600c3d793 Mon Sep 17 00:00:00 2001 From: Markus Doits Date: Sun, 10 Apr 2016 21:37:18 +0200 Subject: modify spec to check for .es6 liniting --- spec/fixtures/test.git/git/index | Bin 137 -> 209 bytes spec/fixtures/test.git/git/logs/HEAD | 1 + spec/fixtures/test.git/git/logs/refs/heads/curly | 1 + .../objects/01/d6dc2234bda69a289104ffdf9667363a2414bd | 2 ++ .../objects/37/018e429ad00f0ec961bd218e3dfa6a6e8cc05b | 1 + .../objects/77/b5c76d003b18b78c41b86e36884ce49f40c259 | Bin 0 -> 66 bytes .../objects/cf/e8bc15022f8b4d3cea89bc20abb13f985feeb0 | Bin 0 -> 60 bytes spec/fixtures/test.git/git/refs/heads/curly | 2 +- spec/fixtures/test.git/world.es6 | 5 +++++ spec/pronto/eslint_spec.rb | 4 ++-- 10 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 spec/fixtures/test.git/git/objects/01/d6dc2234bda69a289104ffdf9667363a2414bd create mode 100644 spec/fixtures/test.git/git/objects/37/018e429ad00f0ec961bd218e3dfa6a6e8cc05b create mode 100644 spec/fixtures/test.git/git/objects/77/b5c76d003b18b78c41b86e36884ce49f40c259 create mode 100644 spec/fixtures/test.git/git/objects/cf/e8bc15022f8b4d3cea89bc20abb13f985feeb0 create mode 100644 spec/fixtures/test.git/world.es6 diff --git a/spec/fixtures/test.git/git/index b/spec/fixtures/test.git/git/index index 786f76d..0b50aa9 100644 Binary files a/spec/fixtures/test.git/git/index and b/spec/fixtures/test.git/git/index differ diff --git a/spec/fixtures/test.git/git/logs/HEAD b/spec/fixtures/test.git/git/logs/HEAD index 7e44d13..a4f13f8 100644 --- a/spec/fixtures/test.git/git/logs/HEAD +++ b/spec/fixtures/test.git/git/logs/HEAD @@ -11,3 +11,4 @@ e438134aac40ce86789d552f1bdada6582a987f6 85e04b1eb1a721d42db51d49e49dfeb8255a574 85e04b1eb1a721d42db51d49e49dfeb8255a5741 931004157205727e6a47586feaed0473c6ddbd66 Mindaugas Mozūras 1456674164 +0200 commit (amend): Initial commit 931004157205727e6a47586feaed0473c6ddbd66 931004157205727e6a47586feaed0473c6ddbd66 Mindaugas Mozūras 1456674177 +0200 checkout: moving from master to curly 931004157205727e6a47586feaed0473c6ddbd66 3a6237c5feacca9a37c36bec5110a1eeb9da703b Mindaugas Mozūras 1456674189 +0200 commit: Add a line of code that does not have the correct curlies (eslint) +3a6237c5feacca9a37c36bec5110a1eeb9da703b 37018e429ad00f0ec961bd218e3dfa6a6e8cc05b Markus Doits 1460316876 +0200 commit: add es6 file diff --git a/spec/fixtures/test.git/git/logs/refs/heads/curly b/spec/fixtures/test.git/git/logs/refs/heads/curly index dfb7828..11582e5 100644 --- a/spec/fixtures/test.git/git/logs/refs/heads/curly +++ b/spec/fixtures/test.git/git/logs/refs/heads/curly @@ -1,2 +1,3 @@ 0000000000000000000000000000000000000000 931004157205727e6a47586feaed0473c6ddbd66 Mindaugas Mozūras 1456674177 +0200 branch: Created from HEAD 931004157205727e6a47586feaed0473c6ddbd66 3a6237c5feacca9a37c36bec5110a1eeb9da703b Mindaugas Mozūras 1456674189 +0200 commit: Add a line of code that does not have the correct curlies (eslint) +3a6237c5feacca9a37c36bec5110a1eeb9da703b 37018e429ad00f0ec961bd218e3dfa6a6e8cc05b Markus Doits 1460316876 +0200 commit: add es6 file diff --git a/spec/fixtures/test.git/git/objects/01/d6dc2234bda69a289104ffdf9667363a2414bd b/spec/fixtures/test.git/git/objects/01/d6dc2234bda69a289104ffdf9667363a2414bd new file mode 100644 index 0000000..b4fe9ea --- /dev/null +++ b/spec/fixtures/test.git/git/objects/01/d6dc2234bda69a289104ffdf9667363a2414bd @@ -0,0 +1,2 @@ +xA +0E]dؘ b2`L[>i vpv\i= >CJǮ$4O)8$fi>$Z$.LТi+e8htn*ð:+EwYN` ] EhV_AU61CW \ No newline at end of file diff --git a/spec/fixtures/test.git/git/objects/37/018e429ad00f0ec961bd218e3dfa6a6e8cc05b b/spec/fixtures/test.git/git/objects/37/018e429ad00f0ec961bd218e3dfa6a6e8cc05b new file mode 100644 index 0000000..1d5c313 --- /dev/null +++ b/spec/fixtures/test.git/git/objects/37/018e429ad00f0ec961bd218e3dfa6a6e8cc05b @@ -0,0 +1 @@ +xA aלb&  1ƅ[1 ZSo<^ylлtj=,Zlbbťi}RZ6)Ѿ-fao&#S[\Vx*ܗUGuWdvs䗴Cm ƀpֽ֊MuRq՗P \ No newline at end of file diff --git a/spec/fixtures/test.git/git/objects/77/b5c76d003b18b78c41b86e36884ce49f40c259 b/spec/fixtures/test.git/git/objects/77/b5c76d003b18b78c41b86e36884ce49f40c259 new file mode 100644 index 0000000..db2600a Binary files /dev/null and b/spec/fixtures/test.git/git/objects/77/b5c76d003b18b78c41b86e36884ce49f40c259 differ diff --git a/spec/fixtures/test.git/git/objects/cf/e8bc15022f8b4d3cea89bc20abb13f985feeb0 b/spec/fixtures/test.git/git/objects/cf/e8bc15022f8b4d3cea89bc20abb13f985feeb0 new file mode 100644 index 0000000..b0bc9b3 Binary files /dev/null and b/spec/fixtures/test.git/git/objects/cf/e8bc15022f8b4d3cea89bc20abb13f985feeb0 differ diff --git a/spec/fixtures/test.git/git/refs/heads/curly b/spec/fixtures/test.git/git/refs/heads/curly index ce18055..21919cd 100644 --- a/spec/fixtures/test.git/git/refs/heads/curly +++ b/spec/fixtures/test.git/git/refs/heads/curly @@ -1 +1 @@ -3a6237c5feacca9a37c36bec5110a1eeb9da703b +37018e429ad00f0ec961bd218e3dfa6a6e8cc05b diff --git a/spec/fixtures/test.git/world.es6 b/spec/fixtures/test.git/world.es6 new file mode 100644 index 0000000..2d1b996 --- /dev/null +++ b/spec/fixtures/test.git/world.es6 @@ -0,0 +1,5 @@ +function HelloWorld(name) +{ + if (foo) foo++; + alert(name); +} diff --git a/spec/pronto/eslint_spec.rb b/spec/pronto/eslint_spec.rb index 29d46e4..7af0aa2 100644 --- a/spec/pronto/eslint_spec.rb +++ b/spec/pronto/eslint_spec.rb @@ -17,12 +17,12 @@ module Pronto it { should == [] } end - context 'patches with a four warnings' do + context 'patches with a four and a five warnings' do include_context 'test repo' let(:patches) { repo.diff('master') } - its(:count) { should == 4 } + its(:count) { should == 9 } its(:'first.msg') { should == "Expected { after 'if' condition." } end end -- cgit v1.2.3