- Run `solhint 'src/**/*.sol'` to enforce security and style rules — configure rules in `.solhint.json` at the project root.
- Use `prettier --plugin=prettier-plugin-solidity --write 'src/**/*.sol'` to auto-format contracts with consistent spacing and brace style.
- Enable the `solhint:recommended` ruleset as a baseline and add security-specific rules like `no-inline-assembly` and `avoid-call-value`.
- Configure `.solhint.json` with `"rules": { "compiler-version": ["error", "^0.8.0"], "func-visibility": ["error", {"ignoreConstructors": true}] }` for project-specific enforcement.
- Run `prettier --check` in CI as a separate step that fails the build when formatting is inconsistent — use `--write` only in pre-commit hooks.
- Use `solhint` rules `ordering` and `named-parameters-mapping` to enforce the standard contract member ordering and improve readability.
- Disable specific rules inline with `// solhint-disable-next-line reason-string` only when there is a documented reason for the exception.