[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81832":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":13,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":15,"starSnapshotCount":15,"syncStatus":39,"lastSyncTime":40,"discoverSource":41},81832,"styl","navidnabavi\u002Fstyl","navidnabavi","A fast, opinionated linter, validator, and formatter for Mapbox GL and MapLibre GL style JSON files.","",null,"Rust",34,1,28,0,4,6,3,45.5,"MIT License",false,"main",true,[25,26,27,28,29,30,31,32,33,34,35],"cli","formatter","geojson","geospatial","gis","linter","map-style","mapbox","maplibre","rust","validator","2026-06-12 04:01:35","# styl\n\n**Linter, validator, and formatter for MapLibre GL \u002F Mapbox GL style JSON.**  \nCatch spec violations, enforce best practices, and keep style files consistent — in CI or locally.\n\n![styl overview](assets\u002Foverview.svg)\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fnavidnabavi\u002Fstyl\u002Factions\u002Fworkflows\u002Frust.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fnavidnabavi\u002Fstyl\u002Factions\u002Fworkflows\u002Frust.yml)\n[![Rust](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Frust-2021_edition-orange.svg)](https:\u002F\u002Fwww.rust-lang.org)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](LICENSE)\n[![MapLibre Spec v8](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMapLibre_spec-v8-green.svg)](https:\u002F\u002Fmaplibre.org\u002Fmaplibre-style-spec\u002F)\n\n---\n\n## Why styl?\n\nGL style JSON files grow fast. A single typo in a source reference silently breaks tiles. An invisible layer left in production wastes render time. Legacy filter syntax slips through code review unnoticed.\n\n`styl` is the `cargo clippy` for your map styles — runs in milliseconds, integrates with CI, and tells you exactly what is wrong and why.\n\n```\n$ styl check style.json\n\nwarning[W002] layers[9].layout.visibility: layer \"Building\" is permanently invisible\n  --> style.json\n  hint: remove the layer or set visibility to \"visible\" if it should be shown\n\nwarning[W011] layers[3].filter: layer \"Landuse\" uses deprecated legacy filter syntax\n  --> style.json\n  hint: migrate to expression-based filters: https:\u002F\u002Fmaplibre.org\u002Fmaplibre-style-spec\u002Fexpressions\u002F\n\nerror[E003] sources.roads: vector source missing required field \"url\" or \"tiles\"\n  --> style.json\n```\n\n---\n\n## Features\n\n| Feature | Description |\n|---|---|\n| **Validator** | Spec violations: missing fields, invalid values, broken source refs (E-codes) |\n| **Linter** | Best-practice warnings: duplicate IDs, invisible layers, legacy filters, perf anti-patterns (W-codes) |\n| **Formatter** | Canonical key ordering with `--check` mode for CI enforcement |\n| **Multiple output formats** | Human-readable, JSON (for tooling), GitHub Actions annotations |\n| **Config file** | Per-project `.stylrc` — per-rule severity overrides, indent settings |\n| **Stdin support** | `cat style.json \\| styl check --stdin` — pipe-friendly |\n\n---\n\n## Installation\n\n### Homebrew (macOS \u002F Linux)\n\n```bash\nbrew tap navidnabavi\u002Ftap\nbrew install styl\n```\n\n### One-line installer\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fnavidnabavi\u002Fstyl\u002Fmain\u002Finstall.sh | bash\n```\n\nDetects your OS and architecture, downloads the correct binary, installs to `\u002Fusr\u002Flocal\u002Fbin`.\n\n### Cargo (requires Rust)\n\n```bash\ncargo install --git https:\u002F\u002Fgithub.com\u002Fnavidnabavi\u002Fstyl\n```\n\n### Build from source\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fnavidnabavi\u002Fstyl\ncd styl\ncargo build --release\n# binary at: target\u002Frelease\u002Fstyl\n```\n\n---\n\n## Usage\n\n```bash\nstyl check style.json                     # validate + lint (most common)\nstyl validate style.json                  # spec violations only (E-codes)\nstyl lint style.json                      # best-practice warnings only (W-codes)\nstyl fmt style.json                       # format in-place\nstyl fmt --check style.json               # CI: exit 1 if formatting would change\nstyl check --format json style.json       # machine-readable output\nstyl check --format github style.json     # GitHub Actions annotations\ncat style.json | styl check --stdin       # read from stdin\n```\n\n### Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| `0` | Clean — no diagnostics |\n| `1` | Diagnostics found (errors or warnings) |\n| `2` | Tool error (bad JSON, I\u002FO failure) |\n\n### CI Integration\n\n**GitHub Action (Recommended):**\n\n```yaml\n- uses: navidnabavi\u002Fstyl@v0.0.4\n  with:\n    style_file: style.json\n```\n\n**Advanced usage:**\n\n```yaml\n- uses: navidnabavi\u002Fstyl@latest\n  with:\n    style_file: style.json\n    command: check       # check (default), validate, lint, fmt\n    format: github       # github (default), human, json, html\n    version: v0.0.4      # pin styl version (optional)\n```\n\n\n**Pre-commit hook:**\n```bash\nstyl fmt --check style.json && styl check style.json\n```\n\n---\n\n## Configuration\n\nDrop a `.stylrc` at your project root:\n\n```toml\n[rules]\nW002 = \"error\"   # invisible layers → hard error\nW003 = \"off\"     # unused layers → silence\nW011 = \"warn\"    # legacy filters → warn (default)\n\n[format]\nindent = 4\n```\n\n`styl` walks up the directory tree to find it automatically.\n\n---\n\n## Documentation\n\n| Document | Description |\n|----------|-------------|\n| [CLI Reference](docs\u002Fcli.md) | All subcommands and flags |\n| [Validators](docs\u002Fvalidators.md) | E-code spec violations |\n| [Linter Rules](docs\u002Flinter.md) | W-code best-practice warnings |\n| [Expressions](docs\u002Fexpressions.md) | Supported expression operators |\n| [Formatter](docs\u002Fformatter.md) | Key ordering and `--check` mode |\n| [Configuration](docs\u002Fconfig.md) | `.stylrc` reference |\n| [Layer Properties](docs\u002Flayer-properties.md) | Valid paint\u002Flayout props per layer type |\n\n---\n\n## Supported Specs\n\n- **MapLibre GL Style Spec v8** (default) — [maplibre.org\u002Fmaplibre-style-spec](https:\u002F\u002Fmaplibre.org\u002Fmaplibre-style-spec\u002F)\n- **Mapbox GL Style Spec v8** — pass `--spec mapbox`\n\n---\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). New validators and linter rules are welcome — the architecture makes adding them straightforward.\n\n```bash\ncargo build && cargo test && cargo clippy -- -D warnings && cargo fmt --check\n```\n\nAll four must pass before opening a PR.\n\n---\n\n## License\n\nMIT\n","styl 是一个用于 Mapbox GL 和 MapLibre GL 风格 JSON 文件的快速、有观点的检查器、验证器和格式化工具。它能够捕获规范违规、强制执行最佳实践，并保持样式文件的一致性，适用于持续集成环境或本地开发。项目采用 Rust 语言编写，确保了高性能和低资源消耗，支持多种输出格式（如人类可读、JSON 和 GitHub Actions 注解），并通过配置文件实现灵活的规则定制。适合需要高效管理和维护地图样式的开发者使用，特别是在大规模地理空间数据处理场景下。",2,"2026-06-11 04:06:52","CREATED_QUERY"]