{"id":14978218,"url":"https://github.com/francoismassart/eslint-plugin-demo-typescript","last_synced_at":"2025-06-14T07:31:58.619Z","repository":{"id":244065490,"uuid":"814153768","full_name":"francoismassart/eslint-plugin-demo-typescript","owner":"francoismassart","description":"Demonstrating an ESLint plugin using TypeScript","archived":false,"fork":false,"pushed_at":"2024-12-03T20:21:37.000Z","size":150,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T12:15:34.246Z","etag":null,"topics":["demo","eslint","eslint-plugin","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-plugin-demo-typescript","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/francoismassart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-12T12:49:41.000Z","updated_at":"2025-05-05T00:13:51.000Z","dependencies_parsed_at":"2024-09-18T23:06:30.559Z","dependency_job_id":null,"html_url":"https://github.com/francoismassart/eslint-plugin-demo-typescript","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"1658c933e37b8cd2276b35d0bc8acaeffe5ab312"},"previous_names":["francoismassart/eslint-plugin-demo-typescript"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/francoismassart/eslint-plugin-demo-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francoismassart%2Feslint-plugin-demo-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francoismassart%2Feslint-plugin-demo-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francoismassart%2Feslint-plugin-demo-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francoismassart%2Feslint-plugin-demo-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/francoismassart","download_url":"https://codeload.github.com/francoismassart/eslint-plugin-demo-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francoismassart%2Feslint-plugin-demo-typescript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259733246,"owners_count":22903164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demo","eslint","eslint-plugin","typescript"],"created_at":"2024-09-24T13:57:05.269Z","updated_at":"2025-06-14T07:31:58.567Z","avatar_url":"https://github.com/francoismassart.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Writing a custom ESLint plugin with TypeScript code\n\nThis repo is based on the \"[Writing a custom ESLint plugin with Typescript](https://thesonofthomp.medium.com/writing-a-custom-eslint-plugin-with-typescript-08d0e01726d2)\" Medium article written by [Adam Thompson\n](https://github.com/thesonofthomp).\n\n## Why this repo?\n\nI was expecting to find a link to a repo with the full code explained in Adam's article but I could not find it.\n\nIt will be a quick way to browse the full code on its own and possibly to enhance it by fixing issues.\n\n## Getting started\n\nI worked on this repo using `pnpm` but it should work with other package manager.\n\n### Install\n\n`pnpm i`\n\n### Build\n\n`pnpm build`\n\n### Test\n\nTests were setup to work with `jest` and `vitest` both comes with pros and cons...\n\nI would recommend Vitest but I also added Jest in case you want it.\n\n| Jest                     | Vitest                                         |\n| :----------------------- | :--------------------------------------------- |\n| Based on `commonjs`      | Based on `ESM`                                 |\n| ✅ Mocking               | ✅ Mocking                                     |\n| ✅ Snapshots             | ✅ Snapshots                                   |\n| ✅ Parallel testing      | ✅ Parallel testing                            |\n| ✅ Fast                  | ✅ Often faster                                |\n| -                        | ✅ Support benches                             |\n| ❌ Require `ts-jest` lib | ❌ Requires `setupFile` and `vitest.config.ts` |\n\nNB: In order to use, the [`RuleTester`](https://typescript-eslint.io/packages/rule-tester) from `@typescript-eslint/rule-tester`, we must:\n\n- Have a `tsconfig.json` with:\n  ```\n  {\n    \"compilerOptions\": {\n      \"module\": \"nodenext\",\n      \"moduleResolution\": \"nodenext\"\n    }\n  }\n  ```\n  More info can be found on [`v6`: Cannot find module `@typescript-eslint/*` or its corresponding type declarations](https://github.com/typescript-eslint/typescript-eslint/issues/7284).\n  \u003e You can use `bundler`, `node16`, or `nodenext` for `moduleResolution`.\n- Use `eslint` with `v8`, [`typescript-eslint` does not support `v9` yet](https://github.com/typescript-eslint/typescript-eslint/issues/8211)\n\n#### Using `vitest`\n\n`pnpm test`\n\n#### Using `jest`\n\n`pnpm test:jest`\n\n### Docs\n\n`pnpm docs:init` will create new files for each rule if necessary.\n\n`pnpm docs:update` will update existing files and the rules list.\n\nYou can see an example of generated documentation in the next section.\n\n### Rules\n\n\u003c!-- begin auto-generated rules list --\u003e\n\n💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n| Name                             | Description            | 💡 |\n| :------------------------------- | :--------------------- | :- |\n| [my-rule](docs/rules/my-rule.md) | An example ESLint rule | 💡 |\n\n\u003c!-- end auto-generated rules list --\u003e\n\n## Additional resources\n\nSee [`eslint-plugin-example-typed-linting`](https://github.com/typescript-eslint/examples/tree/main/packages/eslint-plugin-example-typed-linting) for an example plugin that supports typed linting.\n\n## TODO\n\n- fix: `docs:update`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancoismassart%2Feslint-plugin-demo-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrancoismassart%2Feslint-plugin-demo-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancoismassart%2Feslint-plugin-demo-typescript/lists"}