{"id":19742113,"url":"https://github.com/merkle-open/env-linter","last_synced_at":"2026-03-10T07:03:32.327Z","repository":{"id":39973309,"uuid":"233850087","full_name":"merkle-open/env-linter","owner":"merkle-open","description":"A bunch of CLI helper for your node environment","archived":false,"fork":false,"pushed_at":"2024-08-07T05:54:31.000Z","size":11476,"stargazers_count":8,"open_issues_count":10,"forks_count":3,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-05T19:05:40.865Z","etag":null,"topics":["cli","environment","frontend","linter","node"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/merkle-open.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-14T13:41:23.000Z","updated_at":"2024-08-06T12:10:33.000Z","dependencies_parsed_at":"2025-04-30T06:31:57.783Z","dependency_job_id":"a6f52a0e-6438-48a8-8b92-42476f9ba549","html_url":"https://github.com/merkle-open/env-linter","commit_stats":{"total_commits":118,"total_committers":11,"mean_commits":"10.727272727272727","dds":0.5084745762711864,"last_synced_commit":"cab10f4cb5a20ad706ec87123027be9e9b35a0f2"},"previous_names":["namics/env-linter"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/merkle-open/env-linter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merkle-open%2Fenv-linter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merkle-open%2Fenv-linter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merkle-open%2Fenv-linter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merkle-open%2Fenv-linter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/merkle-open","download_url":"https://codeload.github.com/merkle-open/env-linter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merkle-open%2Fenv-linter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262094601,"owners_count":23258001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","environment","frontend","linter","node"],"created_at":"2024-11-12T01:29:11.743Z","updated_at":"2026-03-10T07:03:27.274Z","avatar_url":"https://github.com/merkle-open.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eenv-linter\u003c/h1\u003e\n    \u003cp\u003eEnsures that all developers on your project use the same, secure LTS version of node, install dependencies in an unambiguous manner and utilize githooks.\u003c/p\u003e\n\n[![npm](https://img.shields.io/npm/v/env-linter.svg)](https://www.npmjs.com/package/env-linter)\n[![Build Status](https://github.com/merkle-open/env-linter/workflows/ci/badge.svg?branch=master)](https://github.com/merkle-open/env-linter/actions)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)\n\n\u003c/div\u003e\n\n\u003cdiv style=\"max-width:640px;margin:0 auto;padding:20px 0 60px 0;\"\u003e\n    \u003cimg src=\"./env-linter.gif\" alt=\"env-linter screencast\"\u003e\n\u003c/div\u003e\n\n## Usage example\n\nFeel free to use env-linter in any way that makes sense for your project. Here is an example of how env-linter could be applied as part of your `package.json`:\n\n```json\n{\n  \"postinstall\": \"env-linter -s -se -d -vs 'node=16.x.x,npm=8.x.x'\",\n  \"prestart\": \"env-linter -h -vs 'node=16.x.x,npm=8.x.x'\",\n  \"lint-staged\": {\n    \"**/package.json\": [\"env-linter -s -d\"]\n  }\n}\n```\n\nYou can skip all env-linter checks by using the environment variable `ENV_LINTER_SKIP=true`. This could be useful on certain CI environments which are not automatically detected by env-linter.\n\n## API usage\n\n```js\nconst { api } = require('env-linter');\n\nawait api({\n  versions: 'node=16.x.x,npm=8.x.x',\n  hooksInstalled: true,\n  saveExact: true,\n  dependenciesExactVersion: true,\n  lts: true,\n  security: true,\n});\n```\n\n## Options\n\n### -vs, --versions [string]\n\nChecks the installed versions of global packages or programs like node, npm, yo, etc. against a required version.\nFor example calling `env-linter --versions 'node=16.x.x'` will ensure that version 16 of node is being used. Multiple versions can be checked by separating them with a comma (eg. `--versions 'node=16.x.x,npm=8.x.x,yo=4.x.x'`).\nenv-linter will stop any further process-execution if a package or program does not satisfy the required version.\n\nCalling env-linter with `--versions` but without any arguments will compare the installed node-version with the node-version from the `.node-version` file.\n\nIn any case, the used node version is compared to the list of [official node-releases](https://nodejs.org/dist/index.json) and process-execution is stopped if the used npm version is older than the npm version that node comes with.\n\n### -h, --hooksInstalled\n\nChecks if git-hooks are installed (i.e. husky installed). env-linter will stop any further process-execution if git-hooks are not installed.\n\n### -se, --security\n\nChecks if the used node version is considered secure according to the current list of node releases. If a newer node-version is available which was released due to a security concern, env-linter will stop any further process-execution. Find out more about the security-flag in this [github issue](https://github.com/nodejs/Release/issues/437).\n\n### -s, --saveExact\n\nChecks if the npm option `save-exact` is enabled, either through a .npmrc file in the project or in the user-directory. env-linter will stop any further process-execution if save-exact is disabled.\n\n### -d, --dependenciesExactVersion\n\nChecks if the version definitions of the dependencies and devDependencies in the `package.json` (or in a monorepository all available packages) are fitting our standards, which means; no approximate versions eg. tilde `~` or caret `^`, no star `*` wildcard and no tarball embeds via `https://*`.\n\n### -l, --lts\n\nChecks if the used node version is a LTS version. Here is some more information [why it might be a good idea to use an LTS version](https://nodejs.org/en/about/releases/).\n\n## Contributing\n\nYou want to [contribute to the env-linter](./.github/contributing.md)? That's awesome!\n\n## License\n\n[MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmerkle-open%2Fenv-linter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmerkle-open%2Fenv-linter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmerkle-open%2Fenv-linter/lists"}