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.
eslint-plugin-sort-decorators
Advanced tools
Changelog
Readme
An ESLint plugin to sort decorators
First, the peer dependencies must be installed:
npm i --save-dev typescript eslint @typescript-eslint/parser
Next, install eslint-plugin-sort-decorators
:
npm i --save-dev eslint-plugin-sort-decorators
As this plugin only works with typescript, the parser must be set in a .eslintrc file:
{
"parser": "@typescript-eslint/parser"
}
The plugin can then be activated by adding sort-decorators
to the plugins
property:
{
"plugins": ["sort-decorators"]
}
The different rules can be defined as follows:
{
"rules": {
"sort-decorators/sort-on-classes": "error"
}
}
Or simply extends a configuration preset:
{
"extends": ["plugin:sort-decorators/recommended"]
}
Name | Description |
---|---|
plugin:sort-decorators/recommended | Enables all rules with a warn security level. |
plugin:sort-decorators/strict | Enables all rules with a error security level and autoFix . |
All this configuration can be done on a
override
section: https://eslint.org/docs/latest/use/configure/configuration-files#how-do-overrides-work
💼 Configurations enabled in.
⚠️ Configurations set to warn in.
✅ Set in the recommended
configuration.
🔒 Set in the strict
configuration.
🔧 Automatically fixable by the --fix
CLI option.
Name | Description | 💼 | ⚠️ | 🔧 |
---|---|---|---|---|
sort-on-accessors | Enforces order of accessors decorators | 🔒 | ✅ | 🔧 |
sort-on-classes | Enforces order of class decorators | 🔒 | ✅ | 🔧 |
sort-on-methods | Enforces order of methods decorators | 🔒 | ✅ | 🔧 |
sort-on-parameters | Enforces order of parameters decorators | 🔒 | ✅ | 🔧 |
sort-on-properties | Enforces order of properties decorators | 🔒 | ✅ | 🔧 |
See information about breaking changes and release notes here.
FAQs
An ESLint plugin to sort decorators
The npm package eslint-plugin-sort-decorators receives a total of 121 weekly downloads. As such, eslint-plugin-sort-decorators popularity was classified as not popular.
We found that eslint-plugin-sort-decorators 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.