Skip to content

Using both React and test configs clobbers some rules #38

@exogen

Description

@exogen

Just came across this when updating our Formidable & Victory component boilerplates. We potentially need to add an es6-react-test config.

Let's say you want to write React tests, so your .eslintrc-client-test would have something like:


---
extends:
  - "defaults/configurations/walmart/es6-react"
  - "defaults/configurations/walmart/es6-test"
  - ".eslintrc-base"
globals:
  expect: false

The problem is that es6-react and es6-test both extend es6, and so the latter config's es6 extend will undo some of the rules overridden in the former config. (In the above case, no-extra-parens is reverted).

So it seems that for correct behavior you MUST extend only one configuration from this repo at a time – and as a result, we should add es6-react-test (or es6-test-react).

/cc @ryan-roemer @baer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions