8000 [eslint config] [patch] re-enabling `jsx-one-expression-per-line` all… · odongohcoder2019/javascript@9a52676 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a52676

Browse files
committed
[eslint config] [patch] re-enabling jsx-one-expression-per-line allowing single children, ignore DOM components on jsx-no-bind; re-enable restructuring-assignment
Reverts b6a268f
1 parent 152b914 commit 9a52676

File tree

1 file changed

+4
-4
lines changed
  • packages/eslint-config-airbnb/rules

1 file changed

+4
-4
lines changed

packages/eslint-config-airbnb/rules/react.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ module.exports = {
9393
'react/jsx-no-bind': ['error', {
9494
ignoreRefs: true,
9595
allowArrowFunctions: true,
96+
allowFunctions: false,
9697
allowBind: false,
98+
ignoreDOMComponents: true,
9799
}],
98100

99101
// Prevent duplicate props in JSX
@@ -413,13 +415,11 @@ module.exports = {
413415

414416
// One JSX Element Per Line
415417
// https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-one-expression-per-line.md
416-
// TODO: re-enable when an option for text children is available
417-
'react/jsx-one-expression-per-line': 'off',
418+
'react/jsx-one-expression-per-line': ['error', { allow: 'single-child' }],
418419

419420
// Enforce consistent usage of destructuring assignment of props, state, and context
420421
// https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md
421-
// TODO: re-enable when component detection is fixed
422-
'react/destructuring-assignment': ['off', 'always'],
422+
'react/destructuring-assignment': ['error', 'always'],
423423

424424
// Prevent using this.state within a this.setState
425425
// https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md

0 commit comments

Comments
 (0)
0