Linter for smart contracts on Nebulas blockchain.
Node.js 10+ and npm 6+.
Run this command to install as a global command:
$ npm i -g naslint
Then, we can use this command naslint
anywhere:
$ naslint my-contract.js
It will lint specified contract file, and output a report.
Run this command in your project's folder to install as a local development dependency:
$ npm i -D naslint
Then, add a script in your package.json
file, like this:
{
"scripts": {
"lint": "naslint ./my-contract.js"
}
}
Thereafter, your can run this script to lint specified contract file:
$ npm run lint
NasLint validates contract code with these built-in rules.
Rule name | Functionality | Doc |
---|---|---|
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. | [↗] |
Sure. NasLint can handle contract code in both JavaScript and TypeScript.
No conflict. These two works completely independently.
Just use ESLint as usual. You can config ESLint in the way your like, these configuration for ESLint will never interference NasLint.
Add group master cssmagic
, who will invite you in.
Name | Contribution [*] | Remark |
---|---|---|
@newraina | 🤔 💻 🚇 🔌 |
Founder |
@cssmagic | 🤔 🌍 📖 |
[*] These legends follow the emoji-key of "all-contributors" specification. Contributions of any kind are welcome!
NasLint is based on these open source projects:
MIT