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

naslint

v0.0.7

Published

Linter for smart contracts on Nebulas blockchain.

Downloads

32

Readme

NasLint

Linter for smart contracts on Nebulas blockchain.

星云链智能合约代码检查工具。

安装与使用

前提

你的电脑需要安装 Node.js 10+ 和 npm 6+。

全局安装

在任何地方运行以下命令,即可安装为全局命令:

$ npm i -g naslint

然后就可以在任何地方使用 naslint 全局命令:

$ naslint my-contract.js

此时会对指定的合约文件进行检查,并给出检查报告。

局部安装

在项目的根目录运行以下命令,即可安装为当前项目的开发依赖:

$ npm i -D naslint

然后可在 package.json 文件中添加以下脚本:

{
  "scripts": {
    "lint": "naslint ./my-contract.js"
  }
}

此后运行以下命令可对指定的合约文件进行检查:

$ npm run lint

规则

规则名 | 功能 | 文档 ---|---|:---: export-contract | Ensure an export is a smart contract object. | [] export | Ensure an export is present. | [] limited-libs | Report unsupported third-party library. | [] no-esm | Report ESM import calls and export. | [] no-undef | Report undefined variables. | []

常见问题

NasLint 可以检查我用 TypeScript 编写的合约文件吗?

可以,NasLint 是针对合约的 Lint 工具,不仅仅针对 JS,目前同时支持 JavaScript 和 TypeScript 编写的合约。

NasLint 与 ESLint 冲突吗?我在项目中还想使用 ESLint 怎么办?

不冲突。这两者完全独立,可以同时使用。

像往常一样使用 ESLint 即可,你可以在项目根目录下设置 eslintrc.js 文件,给 ESLint 用。这个文件并不会干扰到 NasLint。

社区

微信群

有任何关于 NasLint 的疑问,欢迎加群讨论!请加群主微信号 cssmagic,群主会拉你入群。

贡献者  

姓名 | 贡献 [*] | 备注 :---:|---|--- @newraina | 🤔 💻 🚇 🔌 📖 | 创始人 @cssmagic | 🤔 📖 |

[*] These legends follow the emoji-key of "all-contributors" specification. Contributions of any kind are welcome!


Thanks

NasLint is based on these open source projects:

License

MIT