oxc/crates
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
..
oxc Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_allocator Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_ast Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_ast_macros Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_cfg Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_codegen Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_diagnostics Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_index Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_isolated_declarations Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_js_regex chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00
oxc_language_server refactor(linter): use diagnostic codes in lint rules (#4349) 2024-07-20 03:35:00 +00:00
oxc_linter fix(linter/react_perf): allow new objects, array, fns, etc in top scope (#4395) 2024-07-23 01:39:07 +00:00
oxc_macros perf(linter): disable lint rules by file type (#4380) 2024-07-21 15:22:54 +00:00
oxc_mangler Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_minifier Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_module_lexer Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_parser Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_prettier chore: remove unsafe_code = "warn" rust lint 2024-07-15 10:39:08 +08:00
oxc_semantic fix(linter/react_perf): allow new objects, array, fns, etc in top scope (#4395) 2024-07-23 01:39:07 +00:00
oxc_sourcemap Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_span Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_syntax Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_transformer Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_traverse Release crates v0.22.0 (#4414) 2024-07-23 09:38:03 +08:00
oxc_wasm refactor(linter): use diagnostic codes in lint rules (#4349) 2024-07-20 03:35:00 +00:00