oxc/crates/oxc_linter
DonIsaac ac08de817e fix(linter/react_perf): allow new objects, array, fns, etc in top scope (#4395)
Consider the following code:
```tsx
import { FC } from 'react'
import { SvgIcon } from '@mui/material'

const StyledIcon = <SvgIcon sx={{ padding: 1, color: '#ff0000' }} />
//          reported violation  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
export const MyComponent: FC = () => {
    return (
        <div>
            {StyledIcon}
            {/* ... */}
        </div>
    )
}
```

This should not be a violation since the JSX is pre-computed and re-used, which
does not break React's `Object.is()` checks.
2024-07-23 01:39:07 +00:00
..
examples refactor(linter): improve diagnostic labeling (#3960) 2024-06-29 05:19:22 +00:00
fixtures feat(linter): support vitest/no-disabled-tests (#3717) 2024-06-24 15:16:32 +00:00
src fix(linter/react_perf): allow new objects, array, fns, etc in top scope (#4395) 2024-07-23 01:39:07 +00:00
tests feat(tasks/website): code generate the linter rules 2024-05-23 15:21:37 +08:00
Cargo.toml feat(linter): support suggestions and dangerous fixes (#4223) 2024-07-18 02:20:30 +00:00
CHANGELOG.md Release oxlint v0.6.1 (#4326) 2024-07-17 21:18:28 +08:00