{"id":13485146,"url":"https://github.com/aspida/eslint-plugin-aspida","last_synced_at":"2025-04-22T22:23:24.096Z","repository":{"id":42085358,"uuid":"276548020","full_name":"aspida/eslint-plugin-aspida","owner":"aspida","description":"esling plugin for aspida api definition","archived":false,"fork":false,"pushed_at":"2023-03-05T03:37:57.000Z","size":294,"stargazers_count":6,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T07:04:33.501Z","etag":null,"topics":["aspida","eslint","eslint-plugin"],"latest_commit_sha":null,"homepage":"","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/aspida.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}},"created_at":"2020-07-02T04:26:15.000Z","updated_at":"2022-03-23T07:53:33.000Z","dependencies_parsed_at":"2024-01-16T07:22:16.333Z","dependency_job_id":"494659c9-865e-43cc-bc8b-677c945bf009","html_url":"https://github.com/aspida/eslint-plugin-aspida","commit_stats":null,"previous_names":["ibuki2003/eslint-plugin-aspida"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspida%2Feslint-plugin-aspida","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspida%2Feslint-plugin-aspida/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspida%2Feslint-plugin-aspida/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspida%2Feslint-plugin-aspida/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aspida","download_url":"https://codeload.github.com/aspida/eslint-plugin-aspida/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250332479,"owners_count":21413218,"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":["aspida","eslint","eslint-plugin"],"created_at":"2024-07-31T17:01:47.898Z","updated_at":"2025-04-22T22:23:24.067Z","avatar_url":"https://github.com/aspida.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# eslint-plugin-aspida\n\nsupport writing aspida api definition\n\n[aspida repository](https://github.com/aspidajs/aspida/tree/master/packages/aspida)\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```\n$ npm i eslint --save-dev\n```\n\nNext, install `eslint-plugin-aspida`:\n\n```\n$ npm install eslint-plugin-aspida --save-dev\n```\n\n\n## Usage\n\nAdd `aspida` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:\n\n```json\n{\n  \"plugins\": [\n    \"aspida\"\n  ]\n}\n```\n\n\nThen configure the rules you want to use under the rules section.\n\n```json\n{\n  \"rules\": {\n    \"aspida/rule-name\": 2\n  }\n}\n```\n\nWe serve recommended configure. To use it:\n\n```json\n{\n  \"extends\": [\n    \"plugin:aspida/recommended\"\n  ]\n}\n```\n\n## Supported Rules\n\n### export-methods\nMake sure whether `Methods` exported.\n\n### extra-members\nDisallow unused member in each methods.\n\n### identifier-key\nDisallow using literal or expression as interface key.\n\n### non-property-signature\nDisallow non-property-signature (like below)\n\n```typescript\ninterface Methods {\n  get: {\n    query: Type; // valid\n    [key: string]: Type; // invalid\n  }\n}\n```\n\n### old-members\nDisallow old (aspida \u003c 0.14) member name `reqData` and `resData`\n\n### refer-type\nDisallow Refer type in each methods.\n\n```typescript\ninterface Methods {\n  get: {\n    query: Type; // valid\n  };\n  post: PostDefinitionType; // invalid\n}\n```\n\n*Ignoring this rule won't cause error but other rule won't work correctly*\n\n### reqformat-type\nLimit `reqFormat` type one of these:\n- `ArrayBuffer`\n- `Blob`\n- `string`\n- `FormData`\n\n### validate-methods\nMake sure method name is one of valid HTTP method\n- get\n- head\n- post\n- put\n- delete\n- connect\n- options\n- trace\n- patch\n\n### wrong-type-annotations\nDisallow invalid type like below:\n\n```typescript\ninterface Methods {\n  get;\n  post: any;\n  put: {\n    query;\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspida%2Feslint-plugin-aspida","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faspida%2Feslint-plugin-aspida","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspida%2Feslint-plugin-aspida/lists"}