Skip to content
VTEX's TypeScript tools, style guide and best practices
JavaScript TypeScript
Branch: master
Clone or download

Latest commit

kaisermann chore(release): 🤖 publish
 - eslint-config-vtex-react@6.3.1
 - eslint-config-vtex@12.3.1
Latest commit 592e5a4 Mar 30, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.

Typescript Standards

Main repository for VTEX's Typescript standards. Issues should be used to start discussions about standards and patterns. PRs are welcome after being rightfully discussed.




Nothing is written in stone, so if there's some kind of rule or pattern that you wish to discuss or implement, we encourage an open discussion via this repository issues. The project use labels to keep everything organized and easy-to-find:

  • discussion - discussion thread;
  • style - related to code style, something that there's no wrong or right;
  • practices/patterns - related to good coding practices that should be standardized and documented;
  • documentation - a generic documentation issue;
  • todo - common TODO item, with no explicit SLA.

Feel free to use more than one label in an issue, but try keeping them semantic to help developers.

Working with the packages

This project uses lerna with yarn workspaces, so it's highly recommended to read at least the Lerna documentation.

Bootstrap the repository

Running yarn will automatically install all the dependencies for all packages and link them together when needed.


Executing commands

To run a package.json script on all packages, you can use:

lerna run {scriptName}
# will run the scriptName script on all package directories

If you want to only run on some packages, pass a --scope=package-name to the command above. For more instructions, see the lerna run documentation.

lerna run --scope="eslint-*" test
# run the test script on all packages that match the pattern above

The same can be done for regular shell programs with the lerna exec command:

lerna exec "pwd"
# will print the pwd of all package directories

Note: The quotes are not needed if your command doesn't have a string with spaces.

Releasing new versions

For every release, there should be at least one new changelog entry for every modified package. This repository follows the keep a changelog format. The chan CLI can be used to help adding changelog entries:

chan fixed "Fix that nasty potato bug"

It's also possible to run the command on multiple packages with the lerna exec command:

lerna exec "chan fixed 'Fix that nasty potato bug'"
# note the quotes

Every package has a version script that will automatically update their changelog with the new version and entries whenever lerna publish or lerna version is used.

Relevant commands:

  • lerna version - Only update versions without publishing the packages.
  • lerna publish - Update the version and publish the packages.
You can’t perform that action at this time.