Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add languageOptions to ChildContext #85

Merged
merged 7 commits into from
Jun 30, 2024
5 changes: 5 additions & 0 deletions .changeset/short-bees-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-import-x": patch
---

add languageOptions to ChildContext
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export type ChildContext = {
settings: PluginSettings
parserPath?: string | null
parserOptions?: TSESLint.ParserOptions
languageOptions?: TSESLint.FlatConfig.LanguageOptions
path: string
filename?: string
}
Expand Down
3 changes: 2 additions & 1 deletion src/utils/export-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ function childContext(
path: string,
context: RuleContext | ChildContext,
): ChildContext {
const { settings, parserOptions, parserPath } = context
const { settings, parserOptions, parserPath, languageOptions } = context

if (JSON.stringify(settings) !== prevSettings) {
settingsHash = hashObject({ settings }).digest('hex')
Expand All @@ -1109,6 +1109,7 @@ function childContext(
settings,
parserOptions,
parserPath,
languageOptions,
kosmotema marked this conversation as resolved.
Show resolved Hide resolved
path,
filename:
'physicalFilename' in context
Expand Down
Loading