Enforce Relay module-name prefix in naming

Relay 21 made the filename-prefix requirement opt-in for non-Haste
projects, and the relay/graphql-naming lint rule only covers
operations and legacy fragment containers, leaving hooks-based
fragment names unguarded. Re-enable compiler enforcement via
enforce_module_name_prefix_for_non_haste so fragments keep the
collision-free, navigable <ModuleName>_<localName> convention, and
document the rationale in the Relay guide. The compiler accepts the
current sources unchanged, so existing names already comply.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-23 19:22:54 +02:00
parent 91495947aa
commit e93faf4caa
2 changed files with 24 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
{
"root": ".",
"featureFlags": {
"enforce_fragment_alias_where_ambiguous": { "kind": "disabled" }
"enforce_fragment_alias_where_ambiguous": { "kind": "disabled" },
"enforce_module_name_prefix_for_non_haste": true
},
"sources": {
"apps/console/src/pages/iam": "iam",