]>
git.proxmox.com Git - pve-eslint.git/blob - eslint/lib/rules/no-delete-var.js
2 * @fileoverview Rule to flag when deleting variables
8 //------------------------------------------------------------------------------
10 //------------------------------------------------------------------------------
17 description
: "disallow deleting variables",
18 category
: "Variables",
20 url
: "https://eslint.org/docs/rules/no-delete-var"
26 unexpected
: "Variables should not be deleted."
34 UnaryExpression(node
) {
35 if (node
.operator
=== "delete" && node
.argument
.type
=== "Identifier") {
36 context
.report({ node
, messageId
: "unexpected" });