<commit_before>require "language/node"

class Eslint < Formula
  desc "AST-based pattern checker for JavaScript"
  homepage "https://eslint.org"
  url "https://registry.npmjs.org/eslint/-/eslint-8.27.0.tgz"
  sha256 "1b22391dcf314698c65997e8f278473ee7b59b1c122ddb22d754bb99dd1aa79b"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_ventura:  "30de8887ea7c8726a6c923ff39687e6e3c82aa841cc5c5f5cc09f87670352bdf"
    sha256 cellar: :any_skip_relocation, arm64_monterey: "30de8887ea7c8726a6c923ff39687e6e3c82aa841cc5c5f5cc09f87670352bdf"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "30de8887ea7c8726a6c923ff39687e6e3c82aa841cc5c5f5cc09f87670352bdf"
    sha256 cellar: :any_skip_relocation, monterey:       "6cce5393d79bbd5ff611914701b0eae148867d599aae9070077ed76b5c628f03"
    sha256 cellar: :any_skip_relocation, big_sur:        "6cce5393d79bbd5ff611914701b0eae148867d599aae9070077ed76b5c628f03"
    sha256 cellar: :any_skip_relocation, catalina:       "6cce5393d79bbd5ff611914701b0eae148867d599aae9070077ed76b5c628f03"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "30de8887ea7c8726a6c923ff39687e6e3c82aa841cc5c5f5cc09f87670352bdf"
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/".eslintrc.json").write("{}") # minimal config
    (testpath/"syntax-error.js").write("{}}")
    # https://eslint.org/docs/user-guide/command-line-interface#exit-codes
    output = shell_output("#{bin}/eslint syntax-error.js", 1)
    assert_match "Unexpected token }", output
  end
end
<commit_msg>eslint: update 8.27.0 bottle.<commit_after>require "language/node"

class Eslint < Formula
  desc "AST-based pattern checker for JavaScript"
  homepage "https://eslint.org"
  url "https://registry.npmjs.org/eslint/-/eslint-8.27.0.tgz"
  sha256 "1b22391dcf314698c65997e8f278473ee7b59b1c122ddb22d754bb99dd1aa79b"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "f59f8b3d88248759ca8af3677483185d2da7f990ed0963232a2fde8fe52ba295"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "f59f8b3d88248759ca8af3677483185d2da7f990ed0963232a2fde8fe52ba295"
    sha256 cellar: :any_skip_relocation, monterey:       "a326b5b84a6f3b1a40193f35d5a2918c54442106a9a493623d8682422662edef"
    sha256 cellar: :any_skip_relocation, big_sur:        "a326b5b84a6f3b1a40193f35d5a2918c54442106a9a493623d8682422662edef"
    sha256 cellar: :any_skip_relocation, catalina:       "a326b5b84a6f3b1a40193f35d5a2918c54442106a9a493623d8682422662edef"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "f59f8b3d88248759ca8af3677483185d2da7f990ed0963232a2fde8fe52ba295"
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/".eslintrc.json").write("{}") # minimal config
    (testpath/"syntax-error.js").write("{}}")
    # https://eslint.org/docs/user-guide/command-line-interface#exit-codes
    output = shell_output("#{bin}/eslint syntax-error.js", 1)
    assert_match "Unexpected token }", output
  end
end

{'fraction_non_alphanumeric': 0.09876543209876543, 'fraction_numerical': 0.21882716049382717, 'mean_word_length': 5.79454926624738, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7612852', 'n_tokens_mistral': 1766, 'n_tokens_neox': 1376, 'n_words': 168}