
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
@bonniernews/eslint-plugin-typescript-rules
Advanced tools
ESLint Plugin for preventing non ecmascript compatible patterns in Typescript
A plugin for enforcing some Javascript best practices when using Typescript as "typed" Javascript. This plugin can also be used together with Javascript to prevent the usage of Class extends.
Install eslint
and the plugin npm i eslint @bonniernews/eslint-plugin-typescript-rules --save-dev
Add typescript-rules
to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": ["typescript-rules"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"typescript-rules/disallow-class-extends": "error",
"typescript-rules/disallow-abstract-class": "error",
"typescript-rules/disallow-non-es-compatible": "error"
}
}
This plugin exports a recommended configuration that includes all the rules enabled.
To enable this configuration use the extends property in your .eslintrc config file:
{
"extends": [
"eslint:recommended",
"plugin:typescript-rules/recommended"
]
}
Name | Description |
---|---|
disallow-abstract-class | Prevent usage of abstract classes. |
disallow-class-extends | Prevent extending classes. Unless it's an Error class. |
disallow-non-es-compatible | Prevent usage of non EcmaScript compatible functionality when using Typescript, such as decorators, enums, private methods and properties. |
Released under the MIT license.
FAQs
ESLint Plugin for preventing non ecmascript compatible patterns in Typescript
The npm package @bonniernews/eslint-plugin-typescript-rules receives a total of 903 weekly downloads. As such, @bonniernews/eslint-plugin-typescript-rules popularity was classified as not popular.
We found that @bonniernews/eslint-plugin-typescript-rules demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.