Skip to content

fix: Type exported configs correctly#95

Merged
43081j merged 2 commits intoe18e:mainfrom
porada:fix/types
Apr 1, 2026
Merged

fix: Type exported configs correctly#95
43081j merged 2 commits intoe18e:mainfrom
porada:fix/types

Conversation

@porada
Copy link
Copy Markdown
Contributor

@porada porada commented Mar 28, 2026

This PR tightens the types on the exported configs.

Given the plugin referenced itself, so this isn’t the most elegant type definition, but it does the job and improves the overall consumer experience. satisfies wouldn’t be enough in this case.

Fixes #67.
Closes #68.

Before

export default defineConfig({
    rules: {
        ...(pluginPerformance.configs!.modernization as Linter.Config) .rules,
        ...(pluginPerformance.configs!.moduleReplacements as Linter.Config).rules,
        ...(pluginPerformance.configs!.performanceImprovements as Linter.Config).rules,
    },
});

After

export default defineConfig({
    rules: {
        ...pluginPerformance.configs.modernization.rules,
        ...pluginPerformance.configs.moduleReplacements.rules,
        ...pluginPerformance.configs.performanceImprovements.rules,
    },
});

@porada porada requested a review from 43081j March 29, 2026 18:31
@porada porada force-pushed the fix/types branch 2 times, most recently from d7fcefb to 5103c3b Compare April 1, 2026 12:13
@porada porada requested a review from 43081j April 1, 2026 13:29
@43081j 43081j merged commit 92b28cc into e18e:main Apr 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

e18e.configs is possibly undefined when in type-checked eslint config files

3 participants