mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
lint-staged: init at 14.0.1
This commit is contained in:
parent
de06eb1f31
commit
ed8451f8e0
37
pkgs/by-name/li/lint-staged/package.nix
Normal file
37
pkgs/by-name/li/lint-staged/package.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ lib, buildNpmPackage, fetchFromGitHub, testers, lint-staged }:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "lint-staged";
|
||||
version = "14.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "okonet";
|
||||
repo = "lint-staged";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-xuHrxi/1zfeY2dd625iLDNJFoNO28JJrPvmECdqeZXk=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-4lyTBmcX5k//kbFHmzbOQJp+Jd9TPY7bzm51QuiXUzE=";
|
||||
|
||||
dontNpmBuild = true;
|
||||
|
||||
# Fixes `lint-staged --version` output
|
||||
postPatch = ''
|
||||
substituteInPlace package.json --replace \
|
||||
'"version": "0.0.0-development"' \
|
||||
'"version": "${version}"'
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion { package = lint-staged; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Run linters on git staged files";
|
||||
longDescription = ''
|
||||
Run linters against staged git files and don't let 💩 slip into your code base!
|
||||
'';
|
||||
homepage = src.meta.homepage;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ DamienCassou ];
|
||||
mainProgram = "lint-staged";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user