$ npm install eslint-plugin-fbt --save-dev
Add "fbt" to the plugins section.
{
"plugins": ["fbt"]
}
Enable the rules that you would like to use.
{
"rules": {
"fbt/no-empty-strings": "error",
"fbt/no-unwrapped-strings": "warn"
}
}
Rule | Description |
---|---|
fbt/no-unwrapped-strings | Enforce strings to be wrapped with <fbt> or fbt() |
fbt/no-empty-strings | Prevent empty strings from being given to <fbt> or fbt() |