Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@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"
The tsconfig.json
:
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Svelte",
"_version": "2.0.0",
"compilerOptions": {
"moduleResolution": "node",
"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.
*/
"importsNotUsedAsValues": "error",
"isolatedModules": true,
/**
To have warnings/errors of the Svelte compiler at the correct position,
enable source maps by default.
*/
"sourceMap": true,
"strict": false,
"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 110,923 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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.