question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lint rules for contracts

See original GitHub issue

What is the Problem Being Solved?

Our contracts need tighter linting than our general eslint-config. @jessie-check provides some of that additional constraint.

TBD what else we need to constrain (ticket created with the idea that jessie-check wasn’t appropriate but it is in part)

Description of the Design

Define file path patterns for what needs to be contract-linted so that files don’t have to include a pragma.

Define rules for that set

Consider using rules that require type information from TypeScript (using https://typescript-eslint.io/ )

Security Considerations

Test Plan

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Tartuffocommented, Jun 30, 2022

@turadg really needed for launch?

1reaction
dckccommented, May 12, 2022

Though I don’t know the safe alternative to new Map().

import { makeMap } from 'jessie.js';

https://github.com/endojs/Jessie/blob/7cdc722ab7259347c1d7e55606b9fd660ac75549/packages/stdlib/src/ring0/makers.js#L14

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enforcing Team Rules with Lint ‍ - Zarah Dominguez
A great idea​​ Lint is a static analyser and the built-in rules are great! They help identify common problems (forgetting to call super()...
Read more >
Linters and Formatters - Ethereum Smart Contract Best Practices
Linters improve code quality by enforcing rules for style and composition, making code easier to read and review.
Read more >
Intro to Solidity Linting and Formatting | by Daniel Onggunhao
This file specifies exactly which rules you want Solhint to lint for. ... In the above, it runs on all **/*.sol files in...
Read more >
Linter rules - Dart
Cancelling instances of StreamSubscription prevents memory leaks and unexpected behavior. BAD: class A { StreamSubscription _subscriptionA; // LINT ...
Read more >
solhint/rules.md at master - GitHub
Security Rules ; mark-callable-contracts, Explicitly mark all external contracts as trusted or untrusted. ; multiple-sends, Avoid multiple calls of "send" method ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found