pendulum-chain / pendulum-squids

The subsquid squids we use for Pendulum/Amplitude/Foucoco.
GNU General Public License v3.0
0 stars 0 forks source link

Await database operations, add eslint rule #59

Closed bogdanS98 closed 3 months ago

bogdanS98 commented 3 months ago

Closes #55.

This PR adds and configures eslint. The configuration extends the default recommended rules but two rules were deactivated for convenience while other rules to warn about missing await statements were added. This PR also fixes all the warnings/errors thrown by ESlint for this configuration.

Note that the linting scripts are not run automatically but have to be run manually.

gianfra-t commented 3 months ago

I think it makes sense to put it in the README, somewhere near the commands to deploy probably.

ebma commented 3 months ago

I finished setting up ESLint and fixed the warnings/errors.

@gianfra-t and @bogdanS98 do you think we should run the lint script automatically on every commit like we do with prettier or is this too much? I decided not to make it execute automatically.

gianfra-t commented 3 months ago

I think is best to leave it for manual check, or at most a push hook like we did with cargo clippy. But I may be biased since I don't use lint much...