This plugin is used for tokenstreet React Native projects.
Most of the rules will not make sense for other projects. However, this repository and the associated npm package is public to make tooling easier for us.
You'll need to install ESLint and the plugin:
yarn add -D eslint @tokenstreet/eslint-plugin
or
npm install eslint @tokenstreet/eslint-plugin --save-dev
Add @tokenstreet
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["@tokenstreet"]
}
To activate all rules, use the following configuration:
{
"extends": ["@tokenstreet/all"]
}
Alternatively, individual rules can be activated or deactivated:
{
"rules": {
"@tokenstreet/no-error": 2,
"@tokenstreet/no-logger-error-method": 2,
"@tokenstreet/no-text-component": 2,
"@tokenstreet/no-throw": 2
}
}