Home / npm packages / lint-staged

lint-staged source code

Every file of lint-staged@17.6.0 as published on npm: 47 files, 168 KB. Search them by exact text or regex, in milliseconds.

It uses: child_process, process.env, the fs module, crypto.

What lint-staged uses

APIIn lint-staged
eval()
runs a string as JavaScript
NoWho does
new Function()
builds a function from a string, like eval (with or without new)
NoWho does
child_process
starts other programs
Yes: 2 files
e.g. lib/killSubprocesses.js
See the lines
process.env
reads environment variables
Yes: 3 files
e.g. lib/gitWorkflow.js
See the lines
the fs module
reads and writes files
Yes: 6 files
e.g. lib/cli.js
See the lines
http / https
makes or serves HTTP requests with Node's own modules
NoWho does
fetch()
makes HTTP requests
NoWho does
XMLHttpRequest
makes HTTP requests the old browser way
NoWho does
crypto
hashes, encrypts or makes random numbers
Yes: 1 file
e.g. lib/state.js
See the lines
WebAssembly
loads WebAssembly code
NoWho does
document.cookie
reads or writes browser cookies
NoWho does
install scripts
runs a script when it's installed
NoWho does

Exact matches in the published files, so a mention in a comment counts too: open the lines to check.

Largest files

FileSize
README.md45 KB
lib/gitWorkflow.js20 KB
lib/runAll.js11 KB
lib/cli.js6.5 KB
lib/searchConfigs.js5.8 KB
lib/index.js5.5 KB
lib/getSpawnedTask.js4.8 KB
lib/runParallelTasks.js4.5 KB
lib/getSpawnedTasks.js4.2 KB
lib/getStagedFiles.js4.0 KB
lib/validateConfig.js3.8 KB
lib/messages.js3.7 KB
lib/state.js3.6 KB
lib/validateBraces.js3.3 KB
lib/index.d.ts3.3 KB
lib/loadConfig.js3.0 KB
lib/groupFilesByConfig.js3.0 KB
lib/config.d.ts2.8 KB
lib/resolveGitRepo.js2.3 KB
package.json2.2 KB
lib/getFunctionTask.js2.0 KB
lib/validateOptions.js1.8 KB
lib/parseOptions.js1.8 KB
lib/assertGitVersion.js1.7 KB
lib/generateTasks.js1.7 KB
lib/file.js1.5 KB
lib/normalizePath.js1.4 KB
bin/lint-staged.js1.3 KB
LICENSE1.1 KB
lib/execGit.js1.0 KB

Questions

How many files are in lint-staged?

Version 17.6.0 of lint-staged publishes 47 files of source, 168 KB in all, not counting images, fonts and source maps.

Does lint-staged use eval?

No: lint-staged doesn't call eval() anywhere in its published files.

Does lint-staged start other programs?

Yes: lint-staged uses child_process in 2 of its files.

Does lint-staged run an install script?

No: lint-staged has no preinstall, install or postinstall script in its package.json.

npm packages that use…

Every package we've indexed →

Search your own code like this

The same engine answers over your documents and repositories: exact text and regex, every match counted, from your code or your AI agent.

See StackGrep Engine