Skip to content

Bug: [new config system] baseConfig option is unused in FlatESLint #16341

@mdjermanovic

Description

@mdjermanovic

Environment

Node version: v16.14.0
npm version: v8.3.1
Local ESLint version: v8.23.1 (Currently used)
Global ESLint version: Not found
Operating System: win32 10.0.19044

What parser are you using?

Default (Espree)

What did you do?

const { FlatESLint } = require("eslint/use-at-your-own-risk");
const path = require("path");

const eslint = new FlatESLint({
    overrideConfigFile: true, // just to skip loading eslint.config.js
    baseConfig: {
        rules: {
            "id-denylist": ["error", "foo"]
        }
    }
});

(async () => {
    const result = (await eslint.lintText("let foo;", { filePath: path.join(process.cwd(), "a.js") }))[0];

    console.log(result.messages);
})();

What did you expect to happen?

To log a lint message for id-denylist.

What actually happened?

Logs []

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

FlatESLint accepts baseConfig option, but does nothing with it.

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyrepro:neededThis issue should include a reproducible example

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions