# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.su>

_realname=eslint
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=9.35.0
pkgrel=1
pkgdesc='An AST-based pattern checker for JavaScript (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://eslint.org'
msys2_repository_url='https://github.com/eslint/eslint'
msys2_changelog_url='https://github.com/eslint/eslint/blob/main/CHANGELOG.md'
msys2_references=(
  'archlinux: eslint'
  'purl: pkg:npm/eslint'
)
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-nodejs")
source=("https://registry.npmjs.org/${_realname}/-/${_realname}-${pkgver}.tgz")
sha256sums=('91ccbe5b489b4f2b1c76671cd11d0587246812e6d489fcb00edf6d9d114793b9')
noextract=("${_realname}-${pkgver}.tgz")

package() {
  "${MINGW_PREFIX}"/bin/npm install -g \
    --cache "${srcdir}/npm-cache" \
    --prefix "${pkgdir}${MINGW_PREFIX}" \
    "${srcdir}/${_realname}-${pkgver}.tgz"
}
