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" ],
}
]);
ESLint now recommends using
defineConfig()and usingplugins:andextends:to apply plugins and import configs. It also recommends specifying afiles:(now that ESLint supports other file types)I do have one issue though in that the key
dependis 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.