{"id":15707312,"url":"https://github.com/siraben/ts-lint-example","last_synced_at":"2025-10-07T07:29:24.562Z","repository":{"id":111748818,"uuid":"463980997","full_name":"siraben/ts-lint-example","owner":"siraben","description":"Minimal linting example with tree-sitter","archived":false,"fork":false,"pushed_at":"2022-03-22T16:59:18.000Z","size":56,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-19T03:41:07.575Z","etag":null,"topics":["imp","linting","rust","tree-sitter"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siraben.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-02-26T22:21:12.000Z","updated_at":"2023-06-26T10:46:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"78a2fc52-3a43-450f-b6a0-24dca1b50953","html_url":"https://github.com/siraben/ts-lint-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/siraben/ts-lint-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siraben%2Fts-lint-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siraben%2Fts-lint-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siraben%2Fts-lint-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siraben%2Fts-lint-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siraben","download_url":"https://codeload.github.com/siraben/ts-lint-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siraben%2Fts-lint-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278739935,"owners_count":26037474,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["imp","linting","rust","tree-sitter"],"created_at":"2024-10-03T20:39:47.338Z","updated_at":"2025-10-07T07:29:24.534Z","avatar_url":"https://github.com/siraben.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linting example with tree-sitter\nMinimal complete example of how to use the tree-sitter bindings to\nperform some linting checks for the\n[Imp](https://softwarefoundations.cis.upenn.edu/lf-current/Imp.html)\nlanguage.  See the file `index.js` for more information.  It uses a\ntree-sitter query to pattern-match over the AST, iterates through the\nmatches and reports them.  Planned checks include:\n\n- [x] redundant assignments\n- [x] redundant if statement\n- [ ] always false condition\n\nSince Imp has a simple operational semantics, it can be easily proven\nthat these suggestions preserve program behavior.\n\nGiven a file `factorial.imp` with contents\n\n```\nz := x;\ny := 1;\ny := y;\nwhile ~(z = 0) do\n  y := y * z;\n  z := z - 1;\n  x := x;\nend;\nx := x;\nif x = y then x := 1 else x := 1 end\n```\n\nRunning the following command\n\n```ShellSession\n$ node index.js factorial.imp\n```\n\nProduces the output\n\n```\nRedundant assignments:\n[\n  { text: 'y := y', row: 2, column: 0 },\n  { text: 'x := x', row: 6, column: 2 },\n  { text: 'x := x', row: 8, column: 0 }\n]\nRedundant if statements:\n[ { text: 'if x = y then x := 1 else x := 1 end', row: 9, column: 0 } ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiraben%2Fts-lint-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiraben%2Fts-lint-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiraben%2Fts-lint-example/lists"}