directives.js 413 B

12345678910111213141516
  1. /**
  2. * @fileoverview Common utils for directives.
  3. *
  4. * This file contains only shared items for directives.
  5. * If you make a utility for rules, please see `../rules/utils/ast-utils.js`.
  6. *
  7. * @author gfyoung <https://github.com/gfyoung>
  8. */
  9. "use strict";
  10. const directivesPattern =
  11. /^(eslint(?:-env|-enable|-disable(?:(?:-next)?-line)?)?|exported|globals?)(?:\s|$)/u;
  12. module.exports = {
  13. directivesPattern,
  14. };