.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / eslint / lib / rules / no-with.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/eslint/lib/rules/no-with.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/eslint/lib/rules/no-with.js
new file mode 100644 (file)
index 0000000..d3e52e0
--- /dev/null
@@ -0,0 +1,39 @@
+/**
+ * @fileoverview Rule to flag use of with statement
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+    meta: {
+        type: "suggestion",
+
+        docs: {
+            description: "disallow `with` statements",
+            category: "Best Practices",
+            recommended: true,
+            url: "https://eslint.org/docs/rules/no-with"
+        },
+
+        schema: [],
+
+        messages: {
+            unexpectedWith: "Unexpected use of 'with' statement."
+        }
+    },
+
+    create(context) {
+
+        return {
+            WithStatement(node) {
+                context.report({ node, messageId: "unexpectedWith" });
+            }
+        };
+
+    }
+};