Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@tsconfig/node12
Advanced tools
@tsconfig/node12 is a TypeScript configuration preset specifically tailored for Node.js version 12. It provides a set of default TypeScript compiler options that are optimized for developing Node.js applications using TypeScript.
TypeScript Configuration Preset
This feature allows you to extend the default TypeScript configuration for Node.js 12 by simply referencing the preset in your `tsconfig.json` file. This simplifies the setup process and ensures that your TypeScript configuration is optimized for Node.js 12.
{
"extends": "@tsconfig/node12/tsconfig.json"
}
Node.js 12 Compatibility
The configuration preset includes compiler options that are compatible with Node.js 12, such as targeting ES2019 and using the CommonJS module system. This ensures that your TypeScript code is transpiled in a way that is compatible with the features and capabilities of Node.js 12.
{
"compilerOptions": {
"lib": ["es2019"],
"module": "commonjs",
"target": "es2019"
}
}
@tsconfig/node14 is a TypeScript configuration preset for Node.js version 14. It provides a similar set of default TypeScript compiler options optimized for Node.js 14, including support for newer JavaScript features available in ES2020.
@tsconfig/node10 is a TypeScript configuration preset for Node.js version 10. It offers a set of default TypeScript compiler options tailored for Node.js 10, ensuring compatibility with the features and limitations of that version.
@tsconfig/recommended is a general-purpose TypeScript configuration preset that provides a set of recommended compiler options for most TypeScript projects. It is not specific to any Node.js version but offers a good starting point for TypeScript development.
Add the package to your "devDependencies"
:
npm install --save-dev @tsconfig/node12
yarn add --dev @tsconfig/node12
Add to your tsconfig.json
:
"extends": "@tsconfig/node12/tsconfig.json"
The tsconfig.json
:
{
"$schema": "https://json.schemastore.org/tsconfig",
"_version": "12.1.0",
"compilerOptions": {
"lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
"module": "node16",
"target": "es2019",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node16"
}
}
You can find the code here.
FAQs
A base TSConfig for working with Node 12.
We found that @tsconfig/node12 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.