Files
루밀LuMirandGitHub 9c9ae649be chore: update example to use defineConfig (#20111)
* chore: update example to use `defineConfig`

* wip
2025-09-13 15:15:24 +02:00

26 lines
632 B
JavaScript

/**
* @fileoverview Example ESLint config file that uses the custom rule from this tutorial.
* @author Ben Perlmutter
*/
"use strict";
// Import the `defineConfig` helper function
const { defineConfig } = require("eslint/config");
// Import the ESLint plugin
const eslintPluginExample = require("./eslint-plugin-example");
module.exports = defineConfig([
{
files: ["**/*.js"],
languageOptions: {
sourceType: "commonjs",
ecmaVersion: "latest",
},
// Using the eslint-plugin-example plugin defined locally
plugins: { example: eslintPluginExample },
rules: {
"example/enforce-foo-bar": "error",
},
},
]);