diff --git a/docs/src/integrate/nodejs-api.md b/docs/src/integrate/nodejs-api.md index 352d0a28f0a0..63b744a4dcab 100644 --- a/docs/src/integrate/nodejs-api.md +++ b/docs/src/integrate/nodejs-api.md @@ -140,9 +140,9 @@ The `ESLint` constructor takes an `options` object. If you omit the `options` ob * `options.allowInlineConfig` (`boolean`)
Default is `true`. If `false` is present, ESLint suppresses directive comments in source code. If this option is `false`, it overrides the `noInlineConfig` setting in your configurations. -* `options.baseConfig` (`ConfigData | null`)
+* `options.baseConfig` (`ConfigData | ConfigData[] | null`)
Default is `null`. [Configuration object], extended by all configurations used with this instance. You can use this option to define the default settings that will be used if your configuration files don't configure it. -* `options.overrideConfig` (`ConfigData | null`)
+* `options.overrideConfig` (`ConfigData | ConfigData[] | null`)
Default is `null`. [Configuration object], overrides all configurations used with this instance. You can use this option to define the settings that will be used even if your configuration files configure it. * `options.overrideConfigFile` (`string | boolean`)
Default is `false`. The path to a configuration file, overrides all configurations used with this instance. The `options.overrideConfig` option is applied after this option is applied. diff --git a/lib/eslint/eslint.js b/lib/eslint/eslint.js index b918cb5c1d90..ede77bec63b9 100644 --- a/lib/eslint/eslint.js +++ b/lib/eslint/eslint.js @@ -68,7 +68,7 @@ const { Retrier } = require("@humanwhocodes/retry"); * The options with which to configure the ESLint instance. * @typedef {Object} ESLintOptions * @property {boolean} [allowInlineConfig] Enable or disable inline configuration comments. - * @property {ConfigData} [baseConfig] Base config object, extended by all configs used with this instance + * @property {ConfigData|Array} [baseConfig] Base config, extended by all configs used with this instance * @property {boolean} [cache] Enable result caching. * @property {string} [cacheLocation] The cache file to use instead of .eslintcache. * @property {"metadata" | "content"} [cacheStrategy] The strategy used to detect changed files. @@ -79,7 +79,7 @@ const { Retrier } = require("@humanwhocodes/retry"); * @property {boolean} [globInputPaths] Set to false to skip glob resolution of input file paths to lint (default: true). If false, each input file paths is assumed to be a non-glob path to an existing file. * @property {boolean} [ignore] False disables all ignore patterns except for the default ones. * @property {string[]} [ignorePatterns] Ignore file patterns to use in addition to config ignores. These patterns are relative to `cwd`. - * @property {ConfigData} [overrideConfig] Override config object, overrides all configs used with this instance + * @property {ConfigData|Array} [overrideConfig] Override config, overrides all configs used with this instance * @property {boolean|string} [overrideConfigFile] Searches for default config file when falsy; * doesn't do any config file lookup when `true`; considered to be a config filename * when a string.