# naslint

> Linter for smart contracts on Nebulas blockchain.

Latest version **0.0.7** (published 2018-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install naslint
pnpm add naslint
yarn add naslint
bun add naslint
```

Provides the command `naslint`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2018-09-28 |
| First published | 2018-08-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | newraina |
| Maintainers | cssmagic, newraina |
| Keywords | nebulas, blockchain, dapp, smart-contract, lint |

## Links

- npm: https://www.npmjs.com/package/naslint
- Repository: https://github.com/NasaTeam/naslint
- Homepage: https://naslint.js.org
- Issues: https://github.com/NasaTeam/naslint/issues
- npm.io page: https://npm.io/package/naslint

## Dependencies (8)

- [eslint](https://npm.io/package/eslint.md) ^5.4.0
- [snazzy](https://npm.io/package/snazzy.md) ^8.0.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [typescript](https://npm.io/package/typescript.md) ^3.0.3
- [standard-engine](https://npm.io/package/standard-engine.md) ^9.0.0
- [eslint-config-nebulas](https://npm.io/package/eslint-config-nebulas.md) ^0.0.2
- [eslint-plugin-nebulas](https://npm.io/package/eslint-plugin-nebulas.md) ^0.0.7
- [typescript-eslint-parser](https://npm.io/package/typescript-eslint-parser.md) ^19.0.1

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2018-09-28
- 0.0.6 — 2018-09-28
- 0.0.5 — 2018-09-28
- 0.0.4 — 2018-09-27
- 0.0.3 — 2018-09-25
- 0.0.2 — 2018-08-30
- 0.0.1 — 2018-08-26
- 0.0.0-alpha — 2018-08-15

## README

# NasLint

> Linter for smart contracts on Nebulas blockchain.
> 
> 星云链智能合约代码检查工具。

## 安装与使用

#### 前提

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

#### 全局安装

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

```sh
$ npm i -g naslint
```

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

```sh
$ naslint my-contract.js
```

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

#### 局部安装

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

```sh
$ npm i -D naslint
```

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

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

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

```sh
$ npm run lint
```

## 规则

规则名 | 功能 | 文档
---|---|:---:
`export-contract` | Ensure an export is a smart contract object. | [[<sup>↗</sup>]](https://github.com/NasaTeam/eslint-plugin-nebulas/blob/master/docs/rules/export-contract.md)
`export` | Ensure an export is present. | [[<sup>↗</sup>]](https://github.com/NasaTeam/eslint-plugin-nebulas/blob/master/docs/rules/export.md)
`limited-libs` | Report unsupported third-party library. | [[<sup>↗</sup>]](https://github.com/NasaTeam/eslint-plugin-nebulas/blob/master/docs/rules/limited-libs.md)
`no-esm` | Report ESM import calls and export. | [[<sup>↗</sup>]](https://github.com/NasaTeam/eslint-plugin-nebulas/blob/master/docs/rules/no-esm.md)
`no-undef` | Report undefined variables. |  [[<sup>↗</sup>]](https://eslint.org/docs/rules/no-undef)


## 常见问题

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

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

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

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

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

## 社区

#### 微信群

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

#### 贡献者 <a name="contributors">&nbsp;</a>

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

> <sup>[*]</sup> These legends follow the [emoji-key](https://github.com/kentcdodds/all-contributors#emoji-key) of "all-contributors" specification. Contributions of any kind are welcome!

***

## Thanks

NasLint is based on these open source projects:

* [ESLint](https://eslint.org/)
* [standard-engine](https://github.com/standard/standard-engine)

## License

MIT

---
_Source: https://npm.io/package/naslint · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
