index.d.ts 1.3 KB

1234567891011121314151617181920212223242526
  1. export type Config = $eslintcore.ConfigObject;
  2. export type LegacyConfig = $eslintcore.LegacyConfigObject;
  3. export type Plugin = $eslintcore.Plugin;
  4. export type RuleConfig = $eslintcore.RuleConfig;
  5. export type ExtendsElement = $typests.ExtendsElement;
  6. export type SimpleExtendsElement = $typests.SimpleExtendsElement;
  7. export type ConfigWithExtends = $typests.ConfigWithExtends;
  8. export type InfiniteConfigArray = $typests.InfiniteArray<Config>;
  9. export type ConfigWithExtendsArray = $typests.ConfigWithExtendsArray;
  10. /**
  11. * Helper function to define a config array.
  12. * @param {ConfigWithExtendsArray} args The arguments to the function.
  13. * @returns {Config[]} The config array.
  14. * @throws {TypeError} If no arguments are provided or if an argument is not an object.
  15. */
  16. export function defineConfig(...args: ConfigWithExtendsArray): Config[];
  17. /**
  18. * Creates a global ignores config with the given patterns.
  19. * @param {string[]} ignorePatterns The ignore patterns.
  20. * @param {string} [name] The name of the global ignores config.
  21. * @returns {Config} The global ignores config.
  22. * @throws {TypeError} If ignorePatterns is not an array or if it is empty.
  23. */
  24. export function globalIgnores(ignorePatterns: string[], name?: string): Config;
  25. import type * as $eslintcore from "@eslint/core";
  26. import type * as $typests from "./types.ts";