lint-time

raw JSON →
0.1.1 verified Fri May 01 auth: no javascript

Lint your staged git files with zero dependencies, comparing to lint-staged's 60+ nested deps. This package (v0.1.1) runs configured linters only on staged files, with a single exported function lintTime(). Release cadence is irregular as a new project. Differentiators: extremely lightweight, no runtime dependencies, ESM and CJS support, TypeScript types included.

error Cannot find module 'lint-time'
cause Package not installed or not in node_modules path.
fix
Run 'npm install lint-time' in your project root.
error TypeError: lintTime is not a function
cause Incorrect import (default import instead of named import).
fix
Use 'import { lintTime } from "lint-time"' instead of 'import lintTime from "lint-time"'.
breaking No configuration file found, skipping
fix Create a .lint-time.js config file in project root.
breaking Config file must be valid CommonJS module
fix Use module.exports = { ... } in .lint-time.js
deprecated Package may not see frequent updates
fix Consider alternatives like lint-staged if more features needed.
gotcha CLI invocation via npx may require global install for non-npx users
fix Install globally with npm install -g lint-time or use npx.
npm install lint-time
yarn add lint-time
pnpm add lint-time

Shows how to install, configure with a .lint-time.js file, and run lint-time programmatically.

// Install
// npm install lint-time

// In your project root, create .lint-time.js with configuration:
// Example configuration:
module.exports = {
  '*.js': 'eslint --fix',
  '*.css': 'stylelint --fix'
};

// Then run:
const { lintTime } = require('lint-time');

lintTime().then((wasSuccessful) => {
  console.log('Lint passed?', wasSuccessful);
}).catch(err => {
  console.error('Lint error:', err);
});