mirror of
https://github.com/hanzoai/eslint.git
synced 2026-10-30 19:38:10 +00:00
26 lines
632 B
JavaScript
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",
|
|
},
|
|
},
|
|
]);
|