Skip to content

Conversation

KKonstantinov
Copy link
Contributor

This PR's aim is to introduce Prettier to the Typescript SDK, in order to have consistent formatting.

Motivation and Context

Formatting is not automatic and there is no code formatting/styling tool to standardize that. That leads to PR code reviews having to manually identify any styling issues as opposed to that being automatic.

It is integrating prettier with the existing ESlint set up, and adding prettier --check . to the "lint" command in package.json

How Has This Been Tested?

Ran prettier --check . and prettier --write . (to apply the styling) on the full repository.

Breaking Changes

None, it's a devDependency.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

As a further step, if Prettier gets agreed on and merged, a few improvements could be done on this initiative:

  • Add Husky or Lefthook to trigger automatic formatting pre-commit
  • Add Husky / Lefthook to trigger prettier check on push commits.
  • Lint Staged can be added to only lint staged files

Maintainers please review the content of .prettierrc.json so any desired changes can be applied there and prettier --write . can be ran again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant