Skip to content

Commit c71b5a3

Browse files
committed
feature: @putout/eslint-config: no-extra-parens: ignoreJSX
1 parent c4735af commit c71b5a3

4 files changed

Lines changed: 8 additions & 1 deletion

File tree

packages/eslint-config/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export const rules = {
111111
'@stylistic/object-curly-spacing': 'error',
112112
'@stylistic/no-extra-parens': ['error', 'all', {
113113
enforceForSequenceExpressions: false,
114+
ignoreJSX: 'all',
114115
}],
115116
'@stylistic/no-multi-spaces': 'error',
116117
'@stylistic/no-trailing-spaces': ['error', {

packages/eslint-config/test/eslint-config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ test('eslint-config: no-extra-parens', async ({comparePlaces}) => {
5454
await comparePlaces('no-extra-parens', []);
5555
});
5656

57+
test('eslint-config: no-extra-parens-jsx', async ({comparePlaces}) => {
58+
await comparePlaces('no-extra-parens-jsx', []);
59+
});
60+
5761
test('eslint-config: no-unused-labels', async ({comparePlaces}) => {
5862
await comparePlaces('no-unused-labels', []);
5963
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const footer = ({link, text, tabIndex}) => (
2+
<footer className="block width center-horizontal margin-top"/>
3+
);

packages/eslint-config/test/fixture/no-extra-parens.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ const a = () => {
55
a();
66

77
throw (1, 2);
8-

0 commit comments

Comments
 (0)