CLI linter for Cadence projects
A command line linter for Cadence (Flow smart contract language). It uses the Flow CLI to start a language server, and passes Cadence files described via glob pattern.
Install globally
npm i -g @samatech/cadence-lint
Install to local project
npm i -D @samatech/cadence-lint
Basic usage
cadence-lint -f "./contracts/**/*.cdc"
Option | Abbr. | Default | Description |
---|---|---|---|
--files | -f | "./**/*.cdc" | Comman separated file glob, based on fast-glob |
--configPath | -p | "./flow.json" | Path to flow.json |
--failOnWarning | --failOnWarning | - | Flag that causes the linter to fail when warnings are detected |
--failOnHint | --failOnHint | - | Flag that causes the linter to fail when hints are detected |
--help | -h | - | Display usage info |
--version | -v | - | Display version info |