oxc/crates/oxc_semantic/src
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
..
checker refactor(semantic): shorten code (#4358) 2024-07-19 10:29:27 +00:00
class perf: replace some CompactStr usages with Cows (#4377) 2024-07-20 19:19:55 +00:00
jsdoc refactor(semantic): tweak comment argument type (#4157) 2024-07-10 07:19:24 +00:00
module_record fix(semantic): export default foo should have ExportLocalName::Default(NameSpan) entry (#3823) 2024-06-22 11:09:23 +00:00
binder.rs fix(semantic): avoid var hosting insert the var variable to the CatchClause scope (#4337) 2024-07-18 02:52:14 +00:00
builder.rs refactor(semantic)!: remove name from reference (#4329) 2024-07-22 15:59:23 +00:00
counter.rs perf(semantic): calculate number of nodes, scopes, symbols, references before visiting AST (#4367) 2024-07-22 10:47:54 +00:00
diagnostics.rs refactor(linter): improve diagnostic labeling (#3960) 2024-06-29 05:19:22 +00:00
dot.rs fix(ast)!: rename all instances of BigintLiteral to BigIntLiteral. (#3898) 2024-06-25 14:39:42 +00:00
label.rs
lib.rs refactor(semantic)!: remove name from reference (#4329) 2024-07-22 15:59:23 +00:00
node.rs perf(semantic): calculate number of nodes, scopes, symbols, references before visiting AST (#4367) 2024-07-22 10:47:54 +00:00
reference.rs refactor(semantic)!: remove name from reference (#4329) 2024-07-22 15:59:23 +00:00
scope.rs fix(linter/react_perf): allow new objects, array, fns, etc in top scope (#4395) 2024-07-23 01:39:07 +00:00
symbol.rs perf(semantic): calculate number of nodes, scopes, symbols, references before visiting AST (#4367) 2024-07-22 10:47:54 +00:00
unresolved_stack.rs perf(semantic): use Atom instead of CompactStr for UnresolvedReferencesStack (#4401) 2024-07-22 12:18:37 +00:00