-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit events on lr-upload-ctx-provider
block
#553
Conversation
2d5a6c4
to
eb77a36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
eb77a36
to
912ed77
Compare
types/test/events.test-d.ts
Outdated
|
||
const ctx: UploadCtxProvider = null as unknown as UploadCtxProvider; | ||
|
||
ctx.addEventListener('data-output', (e) => { |
Check failure
Code scanning / CodeQL
Property access on null or undefined
() => <lr-config ctx-name="1" key={1}></lr-config>; | ||
|
||
// allow useRef hook | ||
() => { |
Check warning
Code scanning / CodeQL
Expression has no effect
}; | ||
|
||
// allow callback ref | ||
() => { |
Check warning
Code scanning / CodeQL
Expression has no effect
}; | ||
|
||
// allow createRef | ||
() => { |
Check warning
Code scanning / CodeQL
Expression has no effect
}; | ||
|
||
// accept config attributes | ||
() => <lr-config ctx-name="1" multiple multipleMax={1} multipleMin={2} accept="str" />; |
Check warning
Code scanning / CodeQL
Expression has no effect
() => <lr-config ctx-name="1" multiple multipleMax={1} multipleMin={2} accept="str" />; | ||
|
||
// allow to use DOM properties | ||
() => { |
Check warning
Code scanning / CodeQL
Expression has no effect
|
||
|
||
// allow to pass metadata | ||
() => { |
Check warning
Code scanning / CodeQL
Expression has no effect
const ref = React.useRef<Config | null>(null); | ||
if (ref.current) { | ||
const config = ref.current; | ||
config.metadata = {foo: 'bar'} |
Check warning
Code scanning / CodeQL
Useless assignment to property
if (ref.current) { | ||
const config = ref.current; | ||
config.metadata = {foo: 'bar'} | ||
config.metadata = () => ({foo: 'bar'}) |
Check warning
Code scanning / CodeQL
Useless assignment to property
import { OutputFileEntry } from '..'; | ||
|
||
// @ts-expect-error untyped props | ||
() => <lr-config ctx-name="1" something="wrong"></lr-config>; |
Check warning
Code scanning / CodeQL
Expression has no effect
a089d76
to
b30cee5
Compare
3df68db
to
2c65b7d
Compare
Description
Checklist