npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shit-mountain-telescope

v0.1.0

Published

Shit Mountain Telescope — 屎山望远镜: CLI to evaluate a codebase and scan files

Readme

🔭 Shit Mountain Telescope — 屎山望远镜

Shit Mountain Telescope — 屎山望远镜 是一个有趣的代码质量评测工具,用幽默的方式分析 Vue 项目中的“屎山”特征,让代码审查变得更有趣!

✨ 功能特色

🔍 代码质量检测

  • 长函数检测(>50 行)
  • 重复代码检测(跨文件相似度)
  • 圈复杂度计算(AST)
  • TODO/FIXME 统计
  • 硬编码密钥检测

🧩 Vue 特有检测

  • v-if 与 v-for 同元素
  • v-for 缺少 key
  • 不安全 v-html(XSS 风险)
  • 模板嵌套深度
  • 直接修改 props
  • 组件规模统计(Options/Composition)
  • 内存泄漏检测(事件/定时器未清理)

📁 资源分析

  • 大资源文件检测
  • 尺寸与体积匹配分析

🚀 快速开始

安装依赖

npm install --no-fund --no-audit

基本使用(推荐 smt)

# 分析当前目录
smt

# 分析指定目录
smt -p ./src

# 显示帮助 / 版本
smt -h
smt -v

命令行选项

| 选项 | 说明 | 示例 | |------|------|------| | -p, --path <路径> | 指定要分析的目录路径 | -p ./src | | --style <风格> | 控制台/HTML 风格(中文名) | --style "学术论文风" | | --debug-ast | 显示 AST 调试信息 | --debug-ast | | -h, --help | 帮助 | -h | | -v, --version | 版本 | -v |

🔧 技术特性

解析策略

  • Vue3:@vue/compiler-sfc
  • Vue2:vue-template-compiler
  • 降级:正则策略

📄 许可证

MIT License

🤝 贡献

欢迎提交 Issue 和 Pull Request!