🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

lint-time

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lint-time

Lint your staged git files 🩺

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
52
-32.47%
Maintainers
1
Weekly downloads
 
Created
Source

lint-time

banner

npm npm type definitions license install size

lint-time will run your linters of your choice against the files of your choice (like lint-staged). It only checks staged files - i.e. files that have changed since the previous commit.

It aims to achieve the same goal with a far smaller footprint.

When used with simple-git-hooks or husky, it can lint your commits and block bad commits.

Background

Why not just use lint-staged instead?

lint-timelint-staged
0 deps60 nested deps

Install

This package is available from the npm registry.

npm install lint-time

Usage

npx lint-time

API

Exports a single function:

export declare const lintTime: () => Promise<boolean>;

lintTime() will not throw if the checks fail, but will throw if there's something unexpected with your system (e.g. a malformed package.json).

import { lintTime } from "lint-time";

lintTime().then((wasSuccessful) => {
  console.log({ wasSuccessful });
});

Supports JavaScript + TypeScript.

Can also be imported via require("lint-time").

Contributing

GitHub issues / PRs welcome.

Dev environment requires:

  • node >= 16.14.0
  • npm >= 6.8.0
  • git >= 2.11

Licence

Apache-2.0

Keywords

lint

FAQs

Package last updated on 02 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts