Eslint-plugin-jsx-a11y: Add an option to all rules that bail out on spread operator props to fail

Created on 18 Jul 2017  路  3Comments  路  Source: jsx-eslint/eslint-plugin-jsx-a11y

Bailing out when we encounter a spread operator is a choice. It reduces friction of implementation.

But it also hides errors. With an option to not bail on JSXSpreadOperator, we force explicit prop definitions on composed components.

Make this option false by default to maintain current behavior.

enhancement help wanted

Most helpful comment

Perhaps this should be a config-level setting, rather than a rule-specific option?

@ljharb Oh, I like this. Thanks for the suggestion.

All 3 comments

Perhaps this should be a config-level setting, rather than a rule-specific option?

Alternatively, perhaps a specific rule that bans spread props with non-inline-object-literals?

Perhaps this should be a config-level setting, rather than a rule-specific option?

@ljharb Oh, I like this. Thanks for the suggestion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

minhqp picture minhqp  路  6Comments

davidleger95 picture davidleger95  路  4Comments

chemitaxis picture chemitaxis  路  6Comments

zcs19871221 picture zcs19871221  路  5Comments

JosephNK picture JosephNK  路  4Comments