Skip to content

Commit d96bc28

Browse files
committed
feat(jsx): add missing rules from react 5.*
1 parent d789144 commit d96bc28

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/jsx.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ config.rules['react/jsx-boolean-value'] = [2, 'never']
1515
config.rules['react/jsx-closing-bracket-location'] = [2, 'line-aligned']
1616
config.rules['react/jsx-curly-spacing'] = [2, 'never']
1717
config.rules['react/jsx-equals-spacing'] = [2, 'never']
18+
config.rules['react/jsx-filename-extension'] = [2, {extensions: ['.js', '.jsx']}]
1819
config.rules['react/jsx-first-prop-new-line'] = [2, 'multiline']
1920
config.rules['react/jsx-handler-names'] = [2, {
2021
eventHandlerPrefix: 'handle',
@@ -35,13 +36,15 @@ config.rules['react/jsx-sort-props'] = 2
3536
config.rules['react/jsx-space-before-closing'] = [2, 'always']
3637
config.rules['react/jsx-uses-react'] = 2
3738
config.rules['react/jsx-uses-vars'] = 2
39+
config.rules['react/no-comment-textnodes'] = 2
3840
config.rules['react/no-danger'] = 2
3941
config.rules['react/no-deprecated'] = 2
4042
config.rules['react/no-did-mount-set-state'] = 2
4143
config.rules['react/no-did-update-set-state'] = 2
4244
config.rules['react/no-direct-mutation-state'] = 2
4345
config.rules['react/no-is-mounted'] = 2
4446
config.rules['react/no-multi-comp'] = 2
47+
config.rules['react/no-render-return-value'] = 2
4548
config.rules['react/no-set-state'] = 2
4649
config.rules['react/no-string-refs'] = 2
4750
config.rules['react/no-unknown-property'] = 2
@@ -51,6 +54,7 @@ config.rules['react/prop-types'] = 2
5154
config.rules['react/react-in-jsx-scope'] = 2
5255
config.rules['react/require-extension'] = [2, {extensions: ['.js', '.jsx']}]
5356
config.rules['react/require-render-return'] = 2
57+
config.rules['react/require-optimization'] = 2
5458
config.rules['react/self-closing-comp'] = 2
5559
config.rules['react/sort-comp'] = 2
5660
config.rules['react/sort-prop-types'] = 2

0 commit comments

Comments
 (0)