{"id":42989263,"url":"https://github.com/tempoxyz/lints","last_synced_at":"2026-01-31T02:34:51.196Z","repository":{"id":333387326,"uuid":"1137085877","full_name":"tempoxyz/lints","owner":"tempoxyz","description":"Shared ast-grep lint rules for Tempo projects","archived":false,"fork":false,"pushed_at":"2026-01-26T16:52:03.000Z","size":121,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-27T04:55:10.114Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tempoxyz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-18T22:07:25.000Z","updated_at":"2026-01-26T16:52:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tempoxyz/lints","commit_stats":null,"previous_names":["tempoxyz/lints"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tempoxyz/lints","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempoxyz%2Flints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempoxyz%2Flints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempoxyz%2Flints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempoxyz%2Flints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tempoxyz","download_url":"https://codeload.github.com/tempoxyz/lints/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempoxyz%2Flints/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28927253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"online","status_checked_at":"2026-01-31T02:00:09.179Z","response_time":128,"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":[],"created_at":"2026-01-31T02:34:51.139Z","updated_at":"2026-01-31T02:34:51.191Z","avatar_url":"https://github.com/tempoxyz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tempo Lints\n\nShared [ast-grep](https://ast-grep.github.io/) lint rules for Tempo projects.\n\n:warning: This project is under active development :warning:\n\n## Prerequisites\n\nThis package requires [ast-grep](https://ast-grep.github.io/) (`sg` CLI) to run lints.\n\n### Installing ast-grep\n\n**macOS (Homebrew):**\n```bash\nbrew install ast-grep\n```\n\n**Cargo (Rust):**\n```bash\ncargo install ast-grep --locked\n```\n\n**npm (global):**\n```bash\nnpm install -g @ast-grep/cli\n```\n\n**Verify installation:**\n```bash\nsg --version\n# Should output: ast-grep 0.25.x or higher\n```\n\n\u003e **Note:** When using this package via npm/pnpm, the `@ast-grep/cli` dependency is included and installs the `sg` binary automatically via postinstall.\n\n## Installation\n\n### GitHub Action (Recommended for CI)\n\n```yaml\nname: Lint\non: [push, pull_request]\n\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: tempoxyz/lints@v0\n        with:\n          language: rust  # or 'typescript' or 'all'\n```\n\n**Action Inputs:**\n\n| Input | Required | Default | Description |\n|-------|----------|---------|-------------|\n| `language` | ✅ | — | `rust`, `typescript`, or `all` |\n| `path` | | `.` | Path to scan |\n| `fail-on-error` | | `true` | Fail if errors found |\n| `exclude-rules` | | — | Comma-separated rule IDs to skip |\n| `fix` | | `false` | Apply auto-fixes where available |\n| `post-comment` | | `false` | Post results as PR comment |\n| `github-token` | | — | Required if `post-comment: true` |\n\n### npm / npx (via GitHub)\n\nInstall directly from GitHub:\n\n```bash\n# Install from GitHub\nnpm install github:tempoxyz/lints\n\n# Run with npx\nnpx @tempoxyz/lints rust ./src\nnpx @tempoxyz/lints typescript\nnpx @tempoxyz/lints all --json\n```\n\nOr use npx directly without installing:\n\n```bash\nnpx github:tempoxyz/lints rust ./src\n```\n\n### Vendoring (for offline/locked environments)\n\n```bash\n# Using the CLI vendor command (recommended)\nnpx @tempoxyz/lints vendor --lang rust --dest /path/to/your-project\nnpx @tempoxyz/lints vendor --lang typescript --dest /path/to/your-project\nnpx @tempoxyz/lints vendor --lang all --dest /path/to/your-project\n```\n\nThis copies both language-specific rules and shared rules to `.ast-grep/` and generates an `sgconfig.yml`.\n\nAfter vendoring, run lints with:\n\n```bash\nast-grep scan --config sgconfig.yml\n```\n\n## CLI Usage\n\n```\n@tempoxyz/lints \u003clanguage\u003e [path] [options]\n\nArguments:\n  language     Required: rust, typescript, or all\n  path         Path to scan (default: current directory)\n\nOptions:\n  --exclude \u003crules\u003e   Comma-separated list of rules to exclude\n  --json              Output results as JSON\n  --fix               Apply auto-fixes where available\n  --github-action     Output in GitHub Actions format with annotations\n  --help, -h          Show help\n  --version, -v       Show version\n\nExamples:\n  npx @tempoxyz/lints rust\n  npx @tempoxyz/lints typescript ./src\n  npx @tempoxyz/lints all --json\n  npx @tempoxyz/lints rust --exclude no-dbg-macro,no-unwrap-in-lib\n  npx @tempoxyz/lints typescript --fix\n  npx @tempoxyz/lints rust --github-action   # For CI with annotations\n\nVendor Subcommand:\n  npx @tempoxyz/lints vendor --lang \u003clanguage\u003e --dest \u003cpath\u003e\n\n  Copy lint rules to a destination project for offline/locked usage.\n\n  Options:\n    --lang \u003clanguage\u003e   Language rules to vendor (rust, typescript, or all)\n    --dest \u003cpath\u003e       Destination project path\n\n  Examples:\n    npx @tempoxyz/lints vendor --lang rust --dest ./my-project\n    npx @tempoxyz/lints vendor --lang all --dest /path/to/project\n```\n\n## Disabling Rules\n\n### Line-level disable\n\n```rust\n// ast-grep-ignore: no-emojis\nlet emoji = \"🎉\";\n```\n\n```typescript\n// ast-grep-ignore: no-console-log\nconsole.log(\"debug\");\n```\n\n### Block-level disable\n\n```rust\n// ast-grep-ignore-start\nlet emoji1 = \"🎉\";\nlet emoji2 = \"🚀\";\n// ast-grep-ignore-end\n```\n\n## Adding New Rules\n\n1. Create the rule YAML in the appropriate `rules/` directory\n2. Add test cases in `rules/\u003clanguage\u003e/tests/\u003crule-id\u003e-test.yml`\n3. Run `npm test` to generate snapshots\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Test all rules\nnpm test\n\n# Test specific language\nnpm run test:rust\nnpm run test:typescript\nnpm run test:shared-rules\n\n# Update snapshots\nnpm run test:update-snapshots\n\n# Typecheck\nnpm run typecheck\n\n# Lint \u0026 format\nnpm run check\n\n# Scan a directory manually\nast-grep scan --config src/rust/sgconfig.yml /path/to/code\n```\n\n## Versioning\n\nThis package uses GitHub releases for distribution. When using the GitHub Action, you can pin to major versions:\n\n```yaml\n- uses: tempoxyz/lints@v0  # Automatically uses latest v0.x.x\n- uses: tempoxyz/lints@v0.2.1  # Pin to specific version\n- uses: tempoxyz/lints@main  # Use latest from main branch (not recommended)\n```\n\nMajor version tags (`v0`, `v1`, etc.) are automatically updated to point to the latest release in that major version.\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](.github/CONTRIBUTING.md) for details.\n\n**Quick start:**\n\n1. Fork this repo\n2. Make your changes\n3. Create a changeset: `pnpm changeset`\n4. Run tests: `pnpm test`\n5. Open a PR\n\nSee [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md) for detailed instructions on:\n- Development setup\n- Creating changesets\n- Adding new rules\n- Release process\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftempoxyz%2Flints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftempoxyz%2Flints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftempoxyz%2Flints/lists"}