eslint-plugin-react-percy

0.2.4 • Public • Published

eslint-plugin-react-percy

Package Status Build Status

ESLint plugin for react-percy.

Installation

$ yarn add --dev eslint eslint-plugin-react-percy

Note: If you installed ESLint globally then you must also install eslint-plugin-react-percy globally.

Usage

Add react-percy to the plugins section of your .eslintrc configuration file:

{
  "plugins": [
    "react-percy"
  ]
}

You can whitelist the environment variables provided by react-percy by doing:

{
  "env": {
    "react-percy/globals": true
  }
}

If you're using ESLint v4.1.0 or later, you can instead scope the react-percy environment variables to only react-percy test files by doing:

{
  "overrides": [
    {
      "files": [
        "**/__percy__/**/.*.{js,jsx}",
        "**/*.percy.{js,jsx}"
      ],
      "env": {
        "react-percy/globals": true
      }
    }
  ]
}

Package Sidebar

Install

npm i eslint-plugin-react-percy

Weekly Downloads

193

Version

0.2.4

License

MIT

Unpacked Size

2.12 kB

Total Files

3

Last publish

Collaborators

  • fotinakis
  • timhaines
  • percy-admin