Skip to content
Merged
4 changes: 3 additions & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@
"url": "https://github.com/eslint/rewrite/issues"
},
"homepage": "https://github.com/eslint/rewrite/tree/main/packages/compat#readme",
"dependencies": {
"@eslint/core": "^0.15.2"
},
"devDependencies": {
"@eslint/core": "^0.15.2",
"eslint": "^9.27.0"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/compat/src/fixup-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
// Types
//-----------------------------------------------------------------------------

/** @typedef {import("eslint").ESLint.Plugin} FixupPluginDefinition */
/** @typedef {import("eslint").Rule.RuleModule} FixupRuleDefinition */
/** @typedef {import("@eslint/core").Plugin} FixupPluginDefinition */
/** @typedef {import("@eslint/core").RuleDefinition} FixupRuleDefinition */
/** @typedef {FixupRuleDefinition["create"]} FixupLegacyRuleDefinition */
/** @typedef {import("eslint").Linter.Config} FixupConfig */
/** @typedef {import("@eslint/core").ConfigObject} FixupConfig */
/** @typedef {Array<FixupConfig>} FixupConfigArray */

//-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/src/ignore-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import path from "node:path";
// Types
//-----------------------------------------------------------------------------

/** @typedef {import("eslint").Linter.Config} FlatConfig */
/** @typedef {import("@eslint/core").ConfigObject} FlatConfig */

//-----------------------------------------------------------------------------
// Exports
Expand Down
4 changes: 3 additions & 1 deletion packages/config-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
"url": "https://github.com/eslint/rewrite/issues"
},
"homepage": "https://github.com/eslint/rewrite/tree/main/packages/config-helpers#readme",
"dependencies": {
"@eslint/core": "^0.15.2"
},
"devDependencies": {
"@eslint/core": "^0.15.2",
"eslint": "^9.27.0",
"rollup-plugin-copy": "^3.5.0"
},
Expand Down
10 changes: 5 additions & 5 deletions packages/config-helpers/src/define-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
// Type Definitions
//-----------------------------------------------------------------------------

/** @typedef {import("eslint").Linter.Config} Config */
/** @typedef {import("eslint").Linter.LegacyConfig} LegacyConfig */
/** @typedef {import("eslint").ESLint.Plugin} Plugin */
/** @typedef {import("eslint").Linter.RuleEntry} RuleEntry */
/** @typedef {import("@eslint/core").ConfigObject} Config */
/** @typedef {import("@eslint/core").LegacyConfigObject} LegacyConfig */
/** @typedef {import("@eslint/core").Plugin} Plugin */
/** @typedef {import("@eslint/core").RuleConfig} RuleConfig */
/** @typedef {import("./types.ts").ExtendsElement} ExtendsElement */
/** @typedef {import("./types.ts").SimpleExtendsElement} SimpleExtendsElement */
/** @typedef {import("./types.ts").ConfigWithExtends} ConfigWithExtends */
Expand Down Expand Up @@ -153,7 +153,7 @@ function normalizePluginConfig(userNamespace, plugin, config) {
if (result.rules) {
const ruleIds = Object.keys(result.rules);

/** @type {Record<string,RuleEntry|undefined>} */
/** @type {Record<string,RuleConfig|undefined>} */
const newRules = {};

for (let i = 0; i < ruleIds.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion packages/config-helpers/src/global-ignores.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Type Definitions
//-----------------------------------------------------------------------------

/** @typedef {import("eslint").Linter.Config} Config */
/** @typedef {import("@eslint/core").ConfigObject} Config */

//-----------------------------------------------------------------------------
// Helpers
Expand Down
10 changes: 4 additions & 6 deletions packages/config-helpers/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @fileoverview Types for this package.
*/

import type { Linter } from "eslint";
import type { ConfigObject } from "@eslint/core";

/**
* Infinite array type.
Expand All @@ -12,19 +12,17 @@ export type InfiniteArray<T> = T | InfiniteArray<T>[];
/**
* The type of array element in the `extends` property after flattening.
*/
export type SimpleExtendsElement = string | Linter.Config;
export type SimpleExtendsElement = string | ConfigObject;

/**
* The type of array element in the `extends` property before flattening.
*/
export type ExtendsElement =
| SimpleExtendsElement
| InfiniteArray<Linter.Config>;
export type ExtendsElement = SimpleExtendsElement | InfiniteArray<ConfigObject>;

/**
* Config with extends. Valid only inside of `defineConfig()`.
*/
export interface ConfigWithExtends extends Linter.Config {
export interface ConfigWithExtends extends ConfigObject {
extends?: ExtendsElement[];
}

Expand Down
Loading
Loading