Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@shopify/typescript-configs
Advanced tools
A set of typescript configuration files that can be extended.
@shopify/typescript-configs
In TypeScript, the configuration file can extend from a base file. This package provided a few common base configuration files to simplify TypeScript project setup.
To read more about how this extensibility works. See typescript handbook.
Below are two documentation we have also found useful to have on hand while setting up a configuration file.
$ yarn add --dev @shopify/typescript-configs
To start, create a tsconfig.json
in the root of your project.
A typical setup where the application sit in [project root]/app
folder is as follow:
{
"extends": "@shopify/typescript-configs/application.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": ".",
"paths": {"*": ["*", "app/*"]}
},
"include": ["./app/**/*", "./client/**/*", "./server/**/*", "./tests/**/*"]
}
Similarly for a react library project. Create a tsconfig.json
in the root of your project with a setup below assuming the library code sit in [project root]/src
folder.
{
"extends": "@shopify/typescript-configs/library.json",
"compilerOptions": {
"baseUrl": "./src",
"rootDir": "."
},
"include": ["./src/**/*"]
}
A configuration file is provided that included styles setup and a more conservative build target.
{
"extends": "@shopify/typescript-configs/dom.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "."
}
}
A base configuration file is also provided if the above does not fit your need.
{
"extends": "@shopify/typescript-configs/base.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "."
}
}
skipLibCheck: true
settingThere are times when the type failure occur inside of a library your project is consuming, and having skipLibCheck: true
does not resolved it. In this scenario, add an exclude
option to your tsconfig.json
.
eg.
{
"extends": "@shopify/typescript-configs/base.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": ".",
"exclude": ["./node_modules/**/*"]
}
}
FAQs
A set of typescript configuration files that can be extended.
The npm package @shopify/typescript-configs receives a total of 22,271 weekly downloads. As such, @shopify/typescript-configs popularity was classified as popular.
We found that @shopify/typescript-configs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 18 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.