Skip to content

Commit f999478

Browse files
authored
Merge pull request #9 from aboutbits/react-self-closing-tags
force self-closing of components and html tags without children
2 parents 79f522b + 19e2773 commit f999478

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ts-react.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ module.exports = {
2424
'error',
2525
{ props: 'never', children: 'never', propElementValues: 'always' }
2626
],
27+
'react/self-closing-comp': [
28+
'error',
29+
{
30+
component: true,
31+
html: true,
32+
},
33+
],
2734
'react-hooks/rules-of-hooks': 'error',
2835
'react-hooks/exhaustive-deps': 'error',
2936
'tailwindcss/classnames-order': 'off',

0 commit comments

Comments
 (0)