When working with external libraries, it is often undesirable to rename their exports for the sole purpose of conforming with id-match
rule.
This has been proposed as addition to ESLint in eslint/eslint#14005, but ultimately it was rejected:
I think this falls under our policies of not adding new options to stylistic rules, so in my opinion the best course of action would be to make a custom rule/plugin.
This rule would be equivalent to id-match
with an additional option ignoreImports
that would ignore named imports.
Assuming that rule does not permit IDs with $
:
const ContraImageFragment$key = '';
Assuming that this rule is configured to ignore imports:
import type { ContraImageFragment$key } from '@/__generated__/ContraImageFragment.graphql';
Happy to contribute to the codebase.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too