
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@springernature/util-eslint-runner
Advanced tools
As of ESLint v5 a breaking behaviour change (8b7c6ea) was introduced where a fatal error is thrown if any file pattern returns no files. We would like to use a generic linting implementation on all our component monorepos without having to turn JS linting on/off depending on the presence of Javascript.
This small utility will check for the existence of Javascript files in a repo and then run an npm script command if any are found. The npm script should run your eslint setup.
$ npm install @springernature/util-eslint-runner
Installing util-eslint-runner adds command line exectuables to ./node_modules/.bin/.
$ ./node_modules/.bin/util-eslint-runner [options]
Options:
-n --name [string] NPM script to execute (default: null)
-p --pattern [string] Glob pattern to search (default: **/*.js)
-h, --help output usage information
.eslintignoreESLint runner will check for an .eslintignore file, and ignore any patterns it finds.
You always need to specify the --name option, otherwise nothing will run on completion. The default search pattern is **/*.js, which you can override with the --pattern option. Some examples using different options
$ util-eslint-runner --name 'lint-js'
$ util-eslint-runner -n 'lint-js'
$ util-eslint-runner --name 'lint-js' --pattern 'packages/**/*.js'
$ util-eslint-runner -n 'lint-js' -p 'packages/**/*.js'
Below is an example set of example scripts from a monorepo package.json file:
"scripts": {
"lint": "util-eslint-runner -n 'lint-js' -p 'packages/**/*.js' && npm run lint-sass",
"lint-sass": "sass-lint 'packages/**/*.scss'",
"lint-js": "eslint 'packages/**/*.js'"
}
MIT License © 2018, Springer Nature
FAQs
Run ESLint only if Javascript files are found
The npm package @springernature/util-eslint-runner receives a total of 2 weekly downloads. As such, @springernature/util-eslint-runner popularity was classified as not popular.
We found that @springernature/util-eslint-runner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.