Skip to content

[BUG] eslint config basePath #139

@doubleaxe

Description

@doubleaxe

Hello.

According to eslint docs, eslint supports basePath parameter:
https://eslint.org/docs/latest/use/configure/configuration-files#specifying-base-path

But when I try to use it, config-inspector throws error:

ConfigError: Config "test": Unexpected key "basePath" found.
    at rethrowConfigError (file:///node_modules/@eslint/config-inspector/dist/cli.mjs:5115:8)
    at file:///node_modules/@eslint/config-inspector/dist/cli.mjs:6046:5
    at Array.reduce (<anonymous>)
    at ConfigArray.getConfigWithStatus (file:///node_modules/@eslint/config-inspector/dist/cli.mjs:6039:43)
    ... 2 lines matching cause stack trace ...
    at result (file:///node_modules/@eslint/config-inspector/dist/cli.mjs:59:20)
    at Object.isAppliedFilter (node_modules\@nodelib\fs.walk\out\readers\common.js:14:31)
    at #handleEntry (node_modules\@nodelib\fs.walk\out\readers\async.js:119:20)
    at node_modules\@nodelib\fs.walk\out\readers\async.js:93:38 {
  index: 4,
  [cause]: UnexpectedKeyError: Unexpected key "basePath" found.
      at ObjectSchema.validate (file:///node_modules/@eslint/config-inspector/dist/cli.mjs:4778:11)
      at file:///node_modules/@eslint/config-inspector/dist/cli.mjs:4744:9
      at Array.reduce (<anonymous>)
      at ObjectSchema.merge (file:///node_modules/@eslint/config-inspector/dist/cli.mjs:4743:18)

Here is minimal config to reproduce error:

import { defineConfig } from "eslint/config";
export default defineConfig([{
	name: "test",
	basePath: ".",
	rules: {}
}]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions