lint-repository-sui

raw JSON →
1.13.0 verified Fri May 01 auth: no javascript

Provides a set of Sui-specific lint rules for repository code quality, targeting linting of Move smart contracts and related files. Current stable version 1.13.0. Primarily used within Sui ecosystem projects. Differentiates by offering pre-configured rules tailored to Sui development practices.

error Cannot find module 'lint-repository-sui'
cause Package not installed or incorrect import path.
fix
Run npm install lint-repository-sui and verify import statement.
error TypeError: lint.checkFiles is not a function
cause Incorrect import of default export (e.g., using named import as default).
fix
Use correct import: import lint from 'lint-repository-sui'.
gotcha Rules are designed for Sui Move files; applying to other languages may produce unexpected results.
fix Only run on appropriate file extensions.
breaking Version 2.0 renamed the main export from 'lintSui' to 'lint'.
fix Update imports to use 'lint' instead of 'lintSui'.
gotcha Requires Node.js 14+; some features may not work on older versions.
fix Upgrade Node.js to version 14 or higher.
npm install lint-repository-sui
yarn add lint-repository-sui
pnpm add lint-repository-sui

Shows basic usage of lint checking a directory of Move files.

import lint from 'lint-repository-sui';
const results = lint.checkFiles('./contracts/**/*.move');
if (results.length > 0) {
  console.log('Lint issues found:', results);
} else {
  console.log('No issues.');
}