Skip to content

Commit 8e33dbb

Browse files
authored
feat: convert LSP Server to Typescript, remove watchman (#1138)
1 parent adb73f5 commit 8e33dbb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+733
-889
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ packages/graphiql/storybook
3333
packages/graphiql/lsp
3434
**/renderExample.js
3535
**/*.min.js
36-
/coverage/
36+
**/coverage/
3737

3838

3939
# codemirror's build artefacts are exported from the package root

.eslintrc.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
module.exports = {
1111
root: true,
12-
parser: 'babel-eslint',
12+
parser: '@typescript-eslint/parser',
1313
parserOptions: {
1414
ecmaVersion: 7,
1515
sourceType: 'module',
@@ -273,7 +273,7 @@ module.exports = {
273273
'prefer-object-spread/prefer-object-spread': 1,
274274
},
275275

276-
plugins: ['babel', 'import', 'flowtype', 'prefer-object-spread'],
276+
plugins: ['import', 'prefer-object-spread'],
277277

278278
overrides: [
279279
// Cypress plugin, global, etc only for cypress directory
@@ -302,18 +302,15 @@ module.exports = {
302302
// Rules for TypeScript only
303303
{
304304
files: ['*.ts', '*.tsx'],
305-
parser: '@typescript-eslint/parser',
306305
rules: {
307306
'no-unused-vars': 'off',
308307
},
309308
},
310309
// Rules for Flow only
311310
{
312-
files: [
313-
'packages/codemirror-graphql/src/**/*.js',
314-
'packages/codemirror-graphql/src/**/*.jsx',
315-
],
316-
plugins: ['flowtype'],
311+
files: ['packages/codemirror-graphql/src/**/*.js'],
312+
parser: 'babel-eslint',
313+
plugins: ['flowtype', 'babel'],
317314
rules: {
318315
// flowtype (https://github.com/gajus/eslint-plugin-flowtype)
319316
'flowtype/boolean-style': 1,

.flowconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[ignore]
22
.*/__mocks__/.*
33
.*/__tests__/.*
4+
!*.flow.js
45
.*/coverage/.*
6+
!packages/codemirror-graphql/.*
7+
!packages/codemirror-graphql/.*
58
.*/dist/.*
69
.*/resources/.*
710
.*/node_modules/.*

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ module.exports = {
3939
'!**/resources/**',
4040
'!**/examples/**',
4141
'!**/codemirror-graphql/**',
42+
'!**/graphql-language-service-types/**',
4243
],
4344
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"scripts": {
2424
"build": "yarn run build-clean && yarn build-ts && yarn build-js",
25-
"build-js": "lerna run build --scope codemirror-graphql --scope graphql-language-service-server --scope graphql-language-service",
25+
"build-js": "lerna run build --scope codemirror-graphql",
2626
"build-ts": "yarn run tsc",
2727
"build-clean": "yarn run tsc --clean && rimraf '{packages,examples}/**/{dist,esm,bundle,cdn,webpack,storybook}' && lerna run build-clean --parallel",
2828
"build-validate": "lerna run build-validate",
@@ -63,6 +63,7 @@
6363
"@commitlint/config-conventional": "^8.1.0",
6464
"@commitlint/config-lerna-scopes": "^8.1.0",
6565
"@strictsoftware/typedoc-plugin-monorepo": "^0.2.1",
66+
"@types/fetch-mock": "^7.3.2",
6667
"@types/jest": "^24.0.18",
6768
"@typescript-eslint/parser": "^2.3.0",
6869
"babel-eslint": "^10.0.1",

packages/codemirror-graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"build-clean": "rimraf {mode,hint,info,jump,lint}.{js,esm.js,js.flow} && rimraf esm results utils variables coverage __tests__",
4646
"build-flow": "node ../../resources/buildFlow.js",
4747
"watch": "babel --optional runtime resources/watch.js | node",
48-
"test": "nyc --require @babel/polyfill --reporter lcov mocha $npm_package_options_mocha"
48+
"test": "nyc --require @babel/polyfill --reporter lcov --reporter text mocha $npm_package_options_mocha"
4949
},
5050
"peerDependencies": {
5151
"codemirror": "^5.26.0",

packages/graphiql/src/new-components/Toolbar/Tabs.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import List, { ListRow } from '../List/List';
22
import Tabs from './Tabs';
33
import React, { useState } from 'react';
4-
import { layout } from '../../../.storybook/decorators';
4+
import { layout } from '../themes/decorators';
55

66
export default { title: 'Tabbar', decorators: [layout] };
77

packages/graphiql/src/new-components/Toolbar/Toolbar.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Tabs from './Tabs';
33
import React from 'react';
44
import Toolbar from './Toolbar';
55
import Content from './Content';
6-
import { layout } from '../../../.storybook/decorators';
6+
import { layout } from '../themes/decorators';
77

88
export default { title: 'Toolbar', decorators: [layout] };
99

packages/graphiql/src/new-components/Type.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { jsx } from 'theme-ui';
33
import List, { ListRow } from './List/List';
44
import { SectionHeader, Explainer } from './Type';
5-
import { layout } from '../../.storybook/decorators';
5+
import { layout } from './themes/decorators';
66

77
export default { title: 'Type', decorators: [layout] };
88

File renamed without changes.

0 commit comments

Comments
 (0)