
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
@technote-space/eslint-plugin-strict-dependencies
Advanced tools
Restrict imports between files according to the configured dependency rules.
ESlint plugin to define custom module dependency rules.
NOTE: eslint-plugin-strict-dependencies
uses tsconfig, tsconfig.json must be present.
npm install @technote-space/eslint-plugin-strict-dependencies --save-dev
string
(Glob or Forward matching string)
string[]
(Glob or Forward matching string)
boolean
boolean
boolean[default = false]
src/components/aaa.ts
import bbb from './bbb';
./bbb
: resolveRelativeImport = false
src/components/bbb
: resolveRelativeImport = true
boolean
.eslintrc:
"plugins": [
"@technote-space/strict-dependencies",
],
"rules": {
"@technote-space/strict-dependencies/strict-dependencies": [
"error",
[
/**
* Example:
* Limit the dependencies in the following directions
* pages -> components/page -> components/ui
*/
{
"module": "src/components/page",
"allowReferenceFrom": ["src/pages"],
// components/page can't import other components/page
"allowSameModule": false,
"allowTypeImport": true
},
{
"module": "src/components/ui",
"allowReferenceFrom": ["src/components/page"],
// components/ui can import other components/ui
"allowSameModule": true
},
/**
* example:
* Disallow to import `next/router` directly. it should always be imported using `libs/router.ts`.
*/
{
"module": "next/router",
"allowReferenceFrom": ["src/libs/router.ts"],
"allowSameModule": false
},
],
// options
// {
// "resolveRelativeImport": true,
// "allowTypeImport": true
// }
]
}
MIT
FAQs
Restrict imports between files according to the configured dependency rules.
The npm package @technote-space/eslint-plugin-strict-dependencies receives a total of 19 weekly downloads. As such, @technote-space/eslint-plugin-strict-dependencies popularity was classified as not popular.
We found that @technote-space/eslint-plugin-strict-dependencies 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
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.