Skip to content

Commit b3321da

Browse files
authored
add eslint extends plugin:react/recommended (#133)
1 parent 85b48fc commit b3321da

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.eslintrc.cjs

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = {
44
extends: [
55
'standard',
66
'eslint:recommended',
7+
'plugin:react/recommended',
78
'plugin:@typescript-eslint/recommended',
89
'plugin:react-hooks/recommended',
910
'prettier',
@@ -15,6 +16,9 @@ module.exports = {
1516
'react-refresh/only-export-components': 'off', // how much effect does this have?
1617
'@typescript-eslint/no-explicit-any': 'off',
1718
'no-use-before-define': 'off',
19+
'react/react-in-jsx-scope': 'off',
20+
'react/prop-types': 'off',
21+
'react/display-name': 'off',
1822
'import/order': [
1923
'error',
2024
{

src/npm-fastui/src/components/CodeLazy.tsx

+3-7
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@ export default function (props: Code) {
1010
const codeLookup = codeStyle as keyof typeof codeStyles
1111
const style = (codeStyle && codeStyles[codeLookup]) || codeStyles.coldarkCold
1212
return (
13-
<SyntaxHighlighter
14-
className={useClassName(props)}
15-
PreTag="div"
16-
children={text}
17-
language={language}
18-
style={style}
19-
/>
13+
<SyntaxHighlighter className={useClassName(props)} PreTag="div" language={language} style={style}>
14+
{text}
15+
</SyntaxHighlighter>
2016
)
2117
}

0 commit comments

Comments
 (0)