Development - Rete.js

Development

This documentation article is for developers who are looking to develop new plugins, improve existing ones, or debug them.

Rete CLI

Rete CLI is a development tool that includes TypeScript, ESLint, and Jest for plugin building without the need for environment setup. It uses Rollup for building and has pre-configured Babel presets for TypeScript support.

Check out the Rete CLI article for details.

Rete Kit

This tool aims to enhance efficiency during plugin or project development using the framework. It provides several features, such as instant plugin structure creation, project creation and batch build for dependencies.

Check out the Rete Kit article for details.

Style guide

ESLint is used to ensure code style consistency across all packages. The configuration is provided by Rete CLI and comprises rules that are deemed more suitable by the maintainers. If necessary, you can customize the configuration by adding required rules

Although linters are helpful, there are some cases they may miss. To supplement this, we have included a list of recommendations:

  • Use comment with purpose: prioritize refactoring your code to be more clear and concise before relying on comments to explain it
  • Simplicity: strive for a balance between code reuse and the amount of boilerplate code. While boilerplate code may seem redundant, it is often more appropriate than overly complicated solutions that can obscure the code's purpose
  • Handling errors and exceptions: always handle errors and exceptions properly, providing users with useful information about the issue. Ensure that any exceptions thrown do not hinder the application's performance and are gracefully handled whenever possible
  • Performance: the code should be optimized to ensure there are no significant freezes with large data sets, but it's equally important to maintain code readability and ease of maintenance rather than focusing solely on micro-optimizations