ESlint plugin
Introduction
To facilitate the usage of Stringatele in your project, we’ve developed an ESlint plugin.
This plugin will automatically highlight lines in your code where you are using plain text strings without the use of
Stringtale and offer to wrap your text in <Value>
tags. It can also throw errors when building your code.
Implementation
-
Install the
@stringtale/eslint-plugin
as a dev package in your project. -
Add the following ESlint rules to your eslint configuration. Depending on your project, the exact location will differ, usually it’s either in
.eslintrc.js
oreslint.config.js
.For more information on how to configure eslint, check the configuration documentation as well as the configuration files documentation.
-
Your editor should now warn you whenever you attempt to add new text to your project without using Stringtale.