Security News
Python Overtakes JavaScript as Top Programming Language on GitHub
Python becomes GitHub's top language in 2024, driven by AI and data science projects, while AI-powered security tools are gaining adoption.
@tsconfig/strictest
Advanced tools
@tsconfig/strictest is a TypeScript configuration package that provides the strictest possible settings for TypeScript projects. It is designed to enforce the highest level of type safety and code quality by enabling all strict type-checking options available in TypeScript.
Strict Type-Checking
Enables all strict type-checking options in TypeScript, ensuring that the code adheres to the highest standards of type safety.
{"compilerOptions":{"strict":true,"noImplicitAny":true,"strictNullChecks":true,"strictFunctionTypes":true,"strictBindCallApply":true,"strictPropertyInitialization":true,"noImplicitThis":true,"alwaysStrict":true}}
No Implicit Returns
Ensures that all functions have explicit return statements, preventing accidental undefined returns.
{"compilerOptions":{"noImplicitReturns":true}}
No Fallthrough Cases in Switch
Prevents fallthrough cases in switch statements, which can lead to unexpected behavior.
{"compilerOptions":{"noFallthroughCasesInSwitch":true}}
No Unused Locals and Parameters
Flags any unused local variables and parameters, helping to keep the codebase clean and maintainable.
{"compilerOptions":{"noUnusedLocals":true,"noUnusedParameters":true}}
tsconfig-strictest is another package that aims to provide the strictest TypeScript configuration. It is similar to @tsconfig/strictest but may have slight differences in the specific compiler options enabled.
Add the package to your "devDependencies"
:
npm install --save-dev @tsconfig/strictest
yarn add --dev @tsconfig/strictest
Add to your tsconfig.json
:
"extends": "@tsconfig/strictest/tsconfig.json"
The tsconfig.json
:
{
"compilerOptions": {
"strict": true,
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"isolatedModules": true,
"checkJs": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Strictest",
"_version": "2.0.0"
}
You can find the code here.
FAQs
A base TSConfig for working with Strictest.
The npm package @tsconfig/strictest receives a total of 150,332 weekly downloads. As such, @tsconfig/strictest popularity was classified as popular.
We found that @tsconfig/strictest 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
Python becomes GitHub's top language in 2024, driven by AI and data science projects, while AI-powered security tools are gaining adoption.
Security News
Dutch National Police and FBI dismantle Redline and Meta infostealer malware-as-a-service operations in Operation Magnus, seizing servers and source code.
Research
Security News
Socket is tracking a new trend where malicious actors are now exploiting the popularity of LLM research to spread malware through seemingly useful open source packages.