zksync-cli icon indicating copy to clipboard operation
zksync-cli copied to clipboard

chore: update formatters

Open itsacoyote opened this issue 1 year ago • 1 comments

Update eslintrc and prettier to work together with linting and formatting.

  • removed old eslintrc and use the new flat config eslint.config.js
    • version 9 of eslint will require use of the flat config file
  • removed use of @matterlabs/prettier-config for prettier, defined new prettier rules
    • it's a little out of date, will plan on improving this package later
  • added prettier import ordering rules that match existing import ordering rules that used to be in eslintrc
    • eslint is recommended for linting and prettier for formatting. Adding import ordering to prettier ensures the formatting will automatically handle the ordering of imports.
  • add editorconfig with rules. prettier inherits rules from it.
  • added vscode project settings and extensions to maintain consistency in developer environments
    • open to modifying these files before committing
  • modified the lint commands in package.json
    • streamlined the rules so that we have a single command to run in github workflow
    • added a format command
  • update tsconfig.json to cover tests folder for development
    • edit the build tsconfig.json so that it only covers src

itsacoyote avatar Aug 16 '24 16:08 itsacoyote

Need to merge https://github.com/matter-labs/zksync-cli/pull/168 for CI tests to pass.

itsacoyote avatar Aug 19 '24 20:08 itsacoyote