Skip to content

Commit

Permalink
remove case sensitivity in must colocate fragment rule
Browse files Browse the repository at this point in the history
  • Loading branch information
comatory committed Mar 7, 2024
1 parent b573618 commit 110a387
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/rule-must-colocate-fragment-spreads.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ function getGraphQLFragmentSpreads(graphQLAst) {
return fragmentSpreads;
}

function isFirstLetterUppercase(word) {
return /^\p{Lu}/u.test(word);
}

function getGraphQLFragmentDefinitionName(graphQLAst) {
let name = null;
visit(graphQLAst, {
Expand Down Expand Up @@ -171,11 +167,7 @@ function checkColocation(context) {
ImportDeclaration(node) {
if (node.importKind === 'value') {
node.specifiers.forEach(specifier => {
if (
allowNamedImports &&
specifier.imported &&
isFirstLetterUppercase(specifier.imported.name)
) {
if (allowNamedImports && specifier.imported) {
foundImportedModules.push({
type: 'namedImport',
value: specifier.imported.name
Expand Down

0 comments on commit 110a387

Please sign in to comment.