Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@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 101,376 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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.