Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@tsconfig/svelte
Advanced tools
@tsconfig/svelte is a TypeScript configuration preset specifically tailored for Svelte projects. It provides a set of TypeScript compiler options optimized for Svelte development, ensuring compatibility and smooth integration between TypeScript and Svelte.
TypeScript Configuration for Svelte
This configuration ensures that TypeScript works seamlessly with Svelte by setting appropriate compiler options. It includes settings for module resolution, target version, strict type-checking, and compatibility with Svelte files.
{"compilerOptions":{"module":"ESNext","target":"ESNext","strict":true,"esModuleInterop":true,"skipLibCheck":true,"forceConsistentCasingInFileNames":true,"isolatedModules":true,"resolveJsonModule":true,"types":["svelte"]},"include":["src/**/*.ts","src/**/*.svelte"],"exclude":["node_modules"]}
@tsconfig/node12 provides a TypeScript configuration preset optimized for Node.js version 12. It includes settings tailored for server-side development with Node.js, ensuring compatibility and performance.
@tsconfig/next provides a TypeScript configuration preset optimized for Next.js projects. It includes settings that ensure compatibility with Next.js features like server-side rendering and static site generation.
Add the package to your "devDependencies"
:
npm install --save-dev @tsconfig/svelte
yarn add --dev @tsconfig/svelte
Add to your tsconfig.json
:
"extends": "@tsconfig/svelte/tsconfig.json"
NOTE: After
@tsconfig/svelte@2.0.0
, you should add/// <reference types="svelte" />
to ad.ts
or aindex.ts
(entry) file to prevent typescript error.
The tsconfig.json
:
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Svelte",
"_version": "5.0.0",
"compilerOptions": {
"module": "esnext",
"moduleResolution": "bundler",
"target": "es2017",
/**
Svelte Preprocess cannot figure out whether you have a value or a type, so tell TypeScript
to enforce using `import type` instead of `import` for Types.
*/
"verbatimModuleSyntax": true,
/**
To have warnings/errors of the Svelte compiler at the correct position,
enable source maps by default.
*/
"sourceMap": true,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}
You can find the code here.
FAQs
A base TSConfig for working with Svelte.
The npm package @tsconfig/svelte receives a total of 107,187 weekly downloads. As such, @tsconfig/svelte popularity was classified as popular.
We found that @tsconfig/svelte 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.