Skip to content

Conversation

MoOx
Copy link
Contributor

@MoOx MoOx commented Oct 24, 2016

This change allow you to extends "plugin:react/{something}" without having to do something more.
If you just extends one config, you get errors about missing rules definition.

This change allow you to extends "plugin:react/{something}" without having to do something more.
If you just extends one config, you get errors about missing rules definition.
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand - you extend configs, not rules or plugins. react/jsx-indent is a rule, not a config.

In other words, the only two configs that this plugin provides are "recommended" and "all", and that's intentional.

@MoOx
Copy link
Contributor Author

MoOx commented Oct 24, 2016

I am not sure to follow your response.
The idea here is to be able to "just" do

{ 
  extends: "plugin:react/recommended"
}

But currently you need to do

{ 
  "extends": "plugin:react/recommended",
  "plugins": [ "react" ]
}

Otherwise your get error about unknown rules. It's pretty weird to register rules without adding definitions for those rules.
This issue is a follow up on MoOx/phenomic#838

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, TIL. Thanks for explaining - I wasn't aware this was a feature of shared configs.

@yannickcr yannickcr merged commit 16a3b22 into jsx-eslint:master Nov 1, 2016
@yannickcr
Copy link
Member

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants