@@ -4,6 +4,7 @@ class Standard < Formula
4
4
url "https://registry.npmjs.org/standard/-/standard-17.1.2.tgz"
5
5
sha256 "fb2aaf22460bb3e77e090c727c694a56dd9a9486eec30a0152290a5c6d83757c"
6
6
license "MIT"
7
+ head "https://github.com/standard/standard.git" , branch : "master"
7
8
8
9
bottle do
9
10
sha256 cellar : :any_skip_relocation , arm64_sequoia : "d20e97c6540bd3307d244952e9a90986e43b5c11821d88941238a06592dfb422"
@@ -18,18 +19,16 @@ class Standard < Formula
18
19
19
20
def install
20
21
system "npm" , "install" , *std_npm_args
21
- bin . install_symlink Dir [ " #{ libexec } / bin/*"]
22
+ bin . install_symlink libexec . glob ( " bin/*")
22
23
end
23
24
24
25
test do
25
- test_foo = testpath /"foo.js"
26
- test_foo . write "console.log(\" hello there\" )"
27
- output = shell_output ( "#{ bin } /standard #{ test_foo } 2>&1" , 1 )
26
+ ( testpath /"foo.js" ) . write <<~JS
27
+ console.log("hello there")
28
+ if (name != 'John') { }
29
+ JS
30
+ output = shell_output ( "#{ bin } /standard foo.js 2>&1" , 1 )
28
31
assert_match "Strings must use singlequote. (quotes)" , output
29
-
30
- test_bar = testpath /"bar.js"
31
- test_bar . write "if (name != 'John') { }"
32
- output = shell_output ( "#{ bin } /standard #{ test_bar } 2>&1" , 1 )
33
32
assert_match "Expected '!==' and instead saw '!='. (eqeqeq)" , output
34
33
assert_match "Empty block statement. (no-empty)" , output
35
34
0 commit comments