]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/lib/shared/directives.js
import 8.41.0 source
[pve-eslint.git] / eslint / lib / shared / directives.js
diff --git a/eslint/lib/shared/directives.js b/eslint/lib/shared/directives.js
new file mode 100644 (file)
index 0000000..ff67b00
--- /dev/null
@@ -0,0 +1,15 @@
+/**
+ * @fileoverview Common utils for directives.
+ *
+ * This file contains only shared items for directives.
+ * If you make a utility for rules, please see `../rules/utils/ast-utils.js`.
+ *
+ * @author gfyoung <https://github.com/gfyoung>
+ */
+"use strict";
+
+const directivesPattern = /^(eslint(?:-env|-enable|-disable(?:(?:-next)?-line)?)?|exported|globals?)(?:\s|$)/u;
+
+module.exports = {
+    directivesPattern
+};