Skip to content

Only-Delete-Object-Properties

Documentation Index

Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt

Use this file to discover all available pages before exploring further.

Sourcery rule id: only-delete-object-properties

Section titled “Sourcery rule id: only-delete-object-properties”

Delete should only be used for object properties.

var q = 1;
delete q;

The delete operator is intended for use in deleting the properties of objects, and does not have meaningful behaviour otherwise.

See the MDN docs for delete.