diff --git a/lib/index.js b/lib/index.js index 49b0f0e9..d7256608 100644 --- a/lib/index.js +++ b/lib/index.js @@ -5,7 +5,9 @@ const esmConfig = require("./configs/recommended-module") const cjsConfig = require("./configs/recommended-script") const recommendedConfig = require("./configs/recommended") -/** @type {import('eslint').ESLint.Plugin} */ +/** @import { ESLint, Linter } from 'eslint' */ + +/** @type {ESLint.Plugin} */ const base = { meta: { name: pkg.name, @@ -58,13 +60,13 @@ const base = { } /** * @typedef {{ - * 'recommended-module': import('eslint').ESLint.ConfigData; - * 'recommended-script': import('eslint').ESLint.ConfigData; - * 'recommended': import('eslint').ESLint.ConfigData; - * 'flat/recommended-module': import('eslint').Linter.FlatConfig; - * 'flat/recommended-script': import('eslint').Linter.FlatConfig; - * 'flat/recommended': import('eslint').Linter.FlatConfig; - * 'flat/mixed-esm-and-cjs': import('eslint').Linter.FlatConfig[]; + * 'recommended-module': ESLint.ConfigData; + * 'recommended-script': ESLint.ConfigData; + * 'recommended': ESLint.ConfigData; + * 'flat/recommended-module': Linter.Config; + * 'flat/recommended-script': Linter.Config; + * 'flat/recommended': Linter.Config; + * 'flat/mixed-esm-and-cjs': Linter.Config[]; * }} Configs */ @@ -83,7 +85,7 @@ const configs = { ], } -/** @type {import('eslint').ESLint.Plugin & { configs: Configs }} */ +/** @type {ESLint.Plugin & { configs: Configs }} */ module.exports = { meta: base.meta, rules: base.rules,