Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

tokenstreet-tech/eslint-plugin

Repository files navigation

@tokenstreet/eslint-plugin

This plugin is used for tokenstreet React Native projects.

npm version downloads types minzipped size contributions welcome

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.

Installation

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

Usage

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
    }
}

Supported Rules