Skip to content

Commit

Permalink
LSP Server should parse more JS extensions (#2060)
Browse files Browse the repository at this point in the history
  • Loading branch information
acao authored Nov 26, 2021
1 parent 33fe6e1 commit 4286185
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/short-fireants-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"graphql-language-service-server": patch
---

Parse more JS extensions in the language server
12 changes: 11 additions & 1 deletion packages/graphql-language-service-server/src/parseDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ import { Range, Position } from 'graphql-language-service-utils';

import { findGraphQLTags, DEFAULT_TAGS } from './findGraphQLTags';

export const DEFAULT_SUPPORTED_EXTENSIONS = ['.js', '.ts', '.jsx', '.tsx'];
export const DEFAULT_SUPPORTED_EXTENSIONS = [
'.js',
'.cjs',
'.mjs',
'.es',
'.esm',
'.es6',
'.ts',
'.jsx',
'.tsx',
];

/**
* .graphql is the officially reccomended extension for graphql files
Expand Down

2 comments on commit 4286185

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.