Skip to content

Commit

Permalink
add eslint extends plugin:react/recommended (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin authored Dec 28, 2023
1 parent 85b48fc commit b3321da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
extends: [
'standard',
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier',
Expand All @@ -15,6 +16,9 @@ module.exports = {
'react-refresh/only-export-components': 'off', // how much effect does this have?
'@typescript-eslint/no-explicit-any': 'off',
'no-use-before-define': 'off',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/display-name': 'off',
'import/order': [
'error',
{
Expand Down
10 changes: 3 additions & 7 deletions src/npm-fastui/src/components/CodeLazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ export default function (props: Code) {
const codeLookup = codeStyle as keyof typeof codeStyles
const style = (codeStyle && codeStyles[codeLookup]) || codeStyles.coldarkCold
return (
<SyntaxHighlighter
className={useClassName(props)}
PreTag="div"
children={text}
language={language}
style={style}
/>
<SyntaxHighlighter className={useClassName(props)} PreTag="div" language={language} style={style}>
{text}
</SyntaxHighlighter>
)
}

0 comments on commit b3321da

Please sign in to comment.