Skip to content

Commit 622cf86

Browse files
committed
fix: add languageOptions to ChildContext
1 parent 3abe5e4 commit 622cf86

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.changeset/short-bees-sell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-import-x": patch
3+
---
4+
5+
add languageOptions to ChildContext

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export type ChildContext = {
7979
settings: PluginSettings
8080
parserPath?: string | null
8181
parserOptions?: TSESLint.ParserOptions
82+
languageOptions?: TSESLint.FlatConfig.LanguageOptions
8283
path: string
8384
filename?: string
8485
}

src/utils/export-map.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ function childContext(
10911091
path: string,
10921092
context: RuleContext | ChildContext,
10931093
): ChildContext {
1094-
const { settings, parserOptions, parserPath } = context
1094+
const { settings, parserOptions, parserPath, languageOptions } = context
10951095

10961096
if (JSON.stringify(settings) !== prevSettings) {
10971097
settingsHash = hashObject({ settings }).digest('hex')
@@ -1109,6 +1109,7 @@ function childContext(
11091109
settings,
11101110
parserOptions,
11111111
parserPath,
1112+
languageOptions,
11121113
path,
11131114
filename:
11141115
'physicalFilename' in context

0 commit comments

Comments
 (0)