Skip to content

Docs: use new defineConfig, plugins and extends #41

Description

@tbroyer

ESLint now recommends using defineConfig() and using plugins: and extends: to apply plugins and import configs. It also recommends specifying a files: (now that ESLint supports other file types)

I do have one issue though in that the key depend is apparently already used by ESLint internally so I have to use a different name; it would be good that the document suggests such a name.

import { defineConfig } from "eslint/config";
import * as moduleReplacements from "eslint-plugin-depend";

export default defineConfig([
    {
        files: ["**/*.js"],
        plugins: {
            moduleReplacements,
        },
        extends: [ "moduleReplacements/flat/recommended" ],
    }
]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions