Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@hyrious/configs
Advanced tools
Readme
Shared configs across my projects.
npm i -g @hyrious/configs
{ "extends": "@hyrious/configs/tsconfig.json" }
Default choice for normal projects.
{ "extends": "@hyrious/configs/tsconfig.strictest.json" }
The strictest
adds these configs aside from strict
:
{ "extends": "@hyrious/configs/tsconfig.casual.json" }
Less strict mode, it alters these settings from strict
:
noImplicitAny: false
It allows you to write globalThis.debug = 1
without error.
strictPropertyInitialization: false
It stops reporting error on uninitialized properties in constructor,
which allows you to write an initialize()
pattern of code.
class Rectangle {
x: number; y: number; width: number; height: number
constructor() { this.initialize.apply(this, arguments) }
initialize(x = 0, y = 0, width = 0, height = 0) { /* ... */ }
}
Why this pattern? Because you can reuse other classes' constructors without hack.
// This is a valid and common usage of JavaScript.
Rectangle.prototype.initialize.call(somethingNotRectangle, ...args)
useUnknownInCatchVariables: false
Make the err
object in catch clause as type of any
.
Some people prefer unknown
because it prevents stupid authors throwing null
or undefined
which
causes err.message
become a TypeError: Cannot read properties of undefined
.
But this is an insane idea and common codes just throw new Error('message')
.
noImplicitOverride: true
Must write an override
annotation before these methods. I just like this mark.
useDefineForClassFields: false
class { foo = 1 }
becomes class { constructor() { this.foo = 1 } }
.
FAQs
Shared configs across my projects
The npm package @hyrious/configs receives a total of 5 weekly downloads. As such, @hyrious/configs popularity was classified as not popular.
We found that @hyrious/configs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.