Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@tsconfig/recommended
Advanced tools
@tsconfig/recommended is a TypeScript configuration package that provides a set of recommended compiler options for TypeScript projects. It helps developers quickly set up a TypeScript project with sensible defaults, ensuring best practices and reducing the need for manual configuration.
Recommended TypeScript Configuration
This feature allows you to extend the recommended TypeScript configuration by simply adding the above line to your `tsconfig.json` file. It includes a set of compiler options that are considered best practices for most TypeScript projects.
{
"extends": "@tsconfig/recommended/tsconfig.json"
}
Strict Type-Checking Options
The recommended configuration includes strict type-checking options, which help catch common errors and improve code quality. This can be particularly useful for large codebases or when working in teams.
{
"compilerOptions": {
"strict": true
}
}
ES6+ Features
The configuration supports modern JavaScript features by targeting ES6 and using ES6 modules. This ensures that your TypeScript code can take advantage of the latest JavaScript features and syntax.
{
"compilerOptions": {
"target": "ES6",
"module": "ES6"
}
}
@tsconfig/node14 provides a TypeScript configuration specifically tailored for Node.js 14. It includes settings that are optimized for Node.js 14 environments, making it a good choice if you are developing a Node.js application.
@tsconfig/strictest offers the strictest possible TypeScript configuration. It is designed for developers who want to enforce the highest level of type safety and code quality in their projects.
Add the package to your "devDependencies"
:
npm install --save-dev @tsconfig/recommended
yarn add --dev @tsconfig/recommended
Add to your tsconfig.json
:
"extends": "@tsconfig/recommended/tsconfig.json"
The tsconfig.json
:
{
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
},
"$schema": "https://json.schemastore.org/tsconfig"
}
You can find the code here.
FAQs
A base TSConfig for working with Recommended.
The npm package @tsconfig/recommended receives a total of 134,452 weekly downloads. As such, @tsconfig/recommended popularity was classified as popular.
We found that @tsconfig/recommended demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.