Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

api.js 597B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @fileoverview Expose out ESLint and CLI to require.
  3. * @author Ian Christian Myers
  4. */
  5. "use strict";
  6. const Linter = require("./linter");
  7. module.exports = {
  8. Linter,
  9. CLIEngine: require("./cli-engine"),
  10. RuleTester: require("./testers/rule-tester"),
  11. SourceCode: require("./util/source-code")
  12. };
  13. let deprecatedLinterInstance = null;
  14. Object.defineProperty(module.exports, "linter", {
  15. enumerable: false,
  16. get() {
  17. if (!deprecatedLinterInstance) {
  18. deprecatedLinterInstance = new Linter();
  19. }
  20. return deprecatedLinterInstance;
  21. }
  22. });