Skip to content

Commit

Permalink
chore: Use jsdoc import syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
scagood committed Oct 25, 2024
1 parent aeff02e commit 98d5fb4
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
*/

Expand All @@ -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,
Expand Down

0 comments on commit 98d5fb4

Please sign in to comment.