Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@tsconfig/node18
Advanced tools
@tsconfig/node18 is a TypeScript configuration preset for Node.js 18. It provides a base tsconfig.json configuration that is optimized for projects running on Node.js version 18, ensuring compatibility and leveraging the latest features of both TypeScript and Node.js.
Base Configuration
This feature allows you to extend the base configuration provided by @tsconfig/node18. By extending this configuration, you inherit a set of TypeScript compiler options that are optimized for Node.js 18.
{"extends":"@tsconfig/node18/tsconfig.json"}
ES Module Support
The configuration supports ES modules, which are natively supported in Node.js 18. This allows you to use modern JavaScript module syntax in your TypeScript projects.
{"compilerOptions":{"module":"ESNext","target":"ES2021"}}
Strict Type-Checking
The configuration enables strict type-checking options, which helps catch common errors and improve code quality by enforcing stricter type rules.
{"compilerOptions":{"strict":true}}
@tsconfig/node16 is a TypeScript configuration preset for Node.js 16. It provides a similar base configuration but is optimized for Node.js version 16. It is useful for projects that need to maintain compatibility with Node.js 16.
@tsconfig/node14 is a TypeScript configuration preset for Node.js 14. Like @tsconfig/node18, it offers a base configuration but is tailored for Node.js version 14, ensuring compatibility with that version.
@tsconfig/recommended provides a general-purpose TypeScript configuration that is not tied to a specific Node.js version. It offers a set of recommended TypeScript compiler options that are suitable for a wide range of projects.
Add the package to your "devDependencies"
:
npm install --save-dev @tsconfig/node18
yarn add --dev @tsconfig/node18
Add to your tsconfig.json
:
"extends": "@tsconfig/node18/tsconfig.json"
The tsconfig.json
:
{
"$schema": "https://json.schemastore.org/tsconfig",
"_version": "18.2.0",
"compilerOptions": {
"lib": ["es2023"],
"module": "node16",
"target": "es2022",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node16"
}
}
You can find the code here.
FAQs
A base TSConfig for working with Node 18.
The npm package @tsconfig/node18 receives a total of 550,085 weekly downloads. As such, @tsconfig/node18 popularity was classified as popular.
We found that @tsconfig/node18 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.