
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
eslint-plugin-demo-typescript
Advanced tools
Demonstrating an eslint plugin written in TypeScript
This repo is based on the "Writing a custom ESLint plugin with Typescript" Medium article written by Adam Thompson .
I was expecting to find a link to a repo with the full code explained in Adam's article but I could not find it.
It will be a quick way to browse the full code on its own and possibly to enhance it by fixing issues.
I worked on this repo using pnpm
but I should work with other package manager.
pnpm i
pnpm build
Tests were setup to work with jest
and vitest
both comes with pros and cons...
I would recommend Vitest but I also added Jest in case you want it.
Jest | Vitest |
---|---|
Based on commonjs | Based on ESM |
✅ Mocking | ✅ Mocking |
✅ Snapshots | ✅ Snapshots |
✅ Parallel testing | ✅ Parallel testing |
✅ Fast | ✅ Often faster |
- | ✅ Support benches |
❌ Require ts-jest lib | ❌ Requires setupFile and vitest.config.ts |
NB: In order to use, the RuleTester
from @typescript-eslint/rule-tester
, we must:
tsconfig.json
with:
{
"compilerOptions": {
"module": "nodenext",
"moduleResolution": "nodenext"
}
}
More info can be found on v6
: Cannot find module @typescript-eslint/*
or its corresponding type declarations.
You can use
bundler
,node16
, ornodenext
formoduleResolution
.
eslint
with v8
, typescript-eslint
does not support v9
yetvitest
pnpm test
jest
pnpm test:jest
npx eslint-doc-generator --init-rule-docs
will create new files for each rule if necessary.
npx eslint-doc-generator
will update existing files and the rules list.
You can see an example of generated documentation in the nex section.
💡 Manually fixable by editor suggestions.
Name | Description | 💡 |
---|---|---|
my-rule | An example ESLint rule | 💡 |
FAQs
Demonstrating an eslint plugin written in TypeScript
The npm package eslint-plugin-demo-typescript receives a total of 4 weekly downloads. As such, eslint-plugin-demo-typescript popularity was classified as not popular.
We found that eslint-plugin-demo-typescript 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.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.