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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@xcube/mini-lint-mac

v0.3.1

Published

cube lint tool for miniapp

Downloads

3

Readme

Cube 小程序 Lint 工具

Cube 小程序实现了支付宝小程序语法的子集,本工具是针对小程序工程目录进行代码检查的命令行工具(CLI)。

安装方式

Mac 平台

npm install -g @xcube/mini-lint-mac

Linux 平台

npm install -g @xcube/mini-lint-linux

使用

最简单的方式

直接在支付宝小程序源代码目录(mini.project.json所在目录)中执行命令,不需任何额外参数

cubelint

指定小程序项目路径

在任意目录下执行命令,以指定路径作为小程序项目的根目录路径

cubelint app --project="/path/to/mini-proj/"

对小程序项目中一个指定的页面进行lint检测

cubelint page --project="/path/to/mini-proj/" --page="pages/index/index"

检查过程中,指定特定的 node_modules 目录

说明:在小程序开发中经常会依赖一些通过 npm 安装的三方 component ,它们会位于 node_modules 目录中。 cubelint 工具默认会在 app.json 所在目录中查找 node_modules 目录并查找这些三方依赖。 但是对于一些 monorepo 项目,往往会出现小程序工程依赖的 node_modules 不在当前 project 目录中,所以 cubelint 提供了单独指定 node_modules 目录路径的能力

lint 整个 App 时指定 node_modules 路径:

cubelint app --project="/path/to/mini-proj/" --node-modules="/path/to/mini-proj/node_modules"

lint 整个某个 Page 时指定 node_modules 路径:

cubelint page --project="/path/to/mini-proj/" --page="pages/index/index" --node-modules="/path/to/mini-proj/node_modules"

检测报告文件输出

加入如下参数,可以csv文件格式输出lint结果(而非直接在命令行显示)

--report="/path/to/report_dir"

也支持json格式输出检测报告:

--report-json="/path/to/report_dir"