Skip to content

Commit

Permalink
docs: baseConfig and overrideConfig can be arrays (eslint#18571)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic authored Jun 7, 2024
1 parent 7fbe211 commit ff6e96e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/src/integrate/nodejs-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ The `ESLint` constructor takes an `options` object. If you omit the `options` ob

* `options.allowInlineConfig` (`boolean`)<br>
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`)<br>
* `options.baseConfig` (`ConfigData | ConfigData[] | null`)<br>
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`)<br>
* `options.overrideConfig` (`ConfigData | ConfigData[] | null`)<br>
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`)<br>
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.
Expand Down
4 changes: 2 additions & 2 deletions lib/eslint/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConfigData>} [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.
Expand All @@ -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<ConfigData>} [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.
Expand Down

0 comments on commit ff6e96e

Please sign in to comment.