
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
eslint-plugin-hardsort
Advanced tools
Sorting is attempted under limited conditions.
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-hardsort
:
npm install eslint-plugin-hardsort --save-dev
Add hardsort
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["hardsort"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"hardsort/object-sort": [
"error",
{
"sortedOrders": ["keyNameLengthAsc"],
"functionKeyNames": ["select"],
"ignoreEnterGroup": false,
"functionValueTypes": [
"AsyncFunction",
"MethodDefinition",
"GeneratorFunction",
"FunctionExpression",
"ArrowFunctionExpression"
],
"functionKeyNamePatterns": ["^on", "^callback"]
}
],
"hardsort/jsx-attr-sort": [
"error",
{
"sortedOrders": ["keyNameLengthAsc"],
"functionKeyNames": ["select"],
"ignoreEnterGroup": true,
"functionValueTypes": [
"AsyncFunction",
"MethodDefinition",
"GeneratorFunction",
"FunctionExpression",
"ArrowFunctionExpression"
],
"functionKeyNamePatterns": ["^on", "^callback"]
}
],
"hardsort/import-grouping": [
"error",
[
{
"id": "components",
"pathPatterns": ["^.*/components(/.*)?"]
},
{
"id": "pages",
"pathPatterns": ["^.*/pages(/.*)?"]
},
{
"id": "default",
"sortedOrders": ["aliasAsc"]
}
],
{
"alias": {
"@": "src"
},
"orders": ["default", "pages", "components"]
}
]
}
}
🔧 Automatically fixable by the --fix
CLI option.
Name | Description | 🔧 |
---|---|---|
import-grouping | import를 그룹화하여 정리합니다. | 🔧 |
jsx-attr-sort | JSX Attributes를 정렬합니다. | 🔧 |
object-sort | Object를 정렬합니다. | 🔧 |
FAQs
Sorting is attempted under limited conditions.
We found that eslint-plugin-hardsort demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.