![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@namics/env-linter
Advanced tools
Ensures that all developers on your project use the same node version, install dependencies in an unambiguous manner and utilize githooks.
Ensures that all developers on your project use the same, secure LTS version of node, install dependencies in an unambiguous manner and utilize githooks.
Feel 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
:
{
"postinstall": "env-linter -s -se -d -vs 'node=14.x.x,npm=7.x.x'",
"prestart": "env-linter -h -vs 'node=14.x.x,npm=7.x.x'",
"lint-staged": {
"**/package.json": ["env-linter -s -d"]
}
}
You 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.
const { api } = require('@namics/env-linter');
await api({
versions: 'node=14.x.x,npm=7.x.x',
hooksInstalled: true,
saveExact: true,
dependenciesExactVersion: true,
lts: true,
security: true,
});
Checks the installed versions of global packages or programs like node, npm, yo, etc. against a required version.
For example calling env-linter --versions 'node=14.x.x'
will ensure that version 14 of node is being used. Multiple versions can be checked by separating them with a comma (eg. --versions 'node=14.x.x,npm=7.x.x,yo=4.x.x'
).
env-linter will stop any further process-execution if a package or program does not satisfy the required version.
Calling env-linter with --versions
but without any arguments will compare the installed node-version with the node-version from the .node-version
file.
In any case, the used node version is compared to the list of official node-releases and process-execution is stopped if the used npm version is older than the npm version that node comes with.
Checks if git-hooks are installed (i.e. husky installed). env-linter will stop any further process-execution if git-hooks are not installed.
Checks 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.
Checks 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.
Checks 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://*
.
Checks 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.
0.5.0 (2021-08-14)
FAQs
Ensures that all developers on your project use the same node version, install dependencies in an unambiguous manner and utilize githooks.
The npm package @namics/env-linter receives a total of 687 weekly downloads. As such, @namics/env-linter popularity was classified as not popular.
We found that @namics/env-linter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.