Skip to content

Commit 269a8e6

Browse files
committed
migrate to typescript
1 parent 8b31adf commit 269a8e6

34 files changed

+15985
-20736
lines changed

.eslintrc

Lines changed: 6 additions & 207 deletions
Original file line numberDiff line numberDiff line change
@@ -1,212 +1,11 @@
11
{
2-
"parser": "babel-eslint",
3-
4-
"plugins": [
5-
"babel",
6-
"prettier"
7-
],
8-
2+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint"],
5+
"root": true,
96
"env": {
10-
"jest": true,
11-
"browser": true,
7+
"node": true,
128
"es6": true,
13-
"node": true
14-
},
15-
16-
"parserOptions": {
17-
"arrowFunctions": true,
18-
"binaryLiterals": true,
19-
"blockBindings": true,
20-
"classes": true,
21-
"defaultParams": true,
22-
"destructuring": true,
23-
"experimentalObjectRestSpread": true,
24-
"forOf": true,
25-
"generators": true,
26-
"globalReturn": true,
27-
"jsx": true,
28-
"modules": true,
29-
"objectLiteralComputedProperties": true,
30-
"objectLiteralDuplicateProperties": true,
31-
"objectLiteralShorthandMethods": true,
32-
"objectLiteralShorthandProperties": true,
33-
"octalLiterals": true,
34-
"regexUFlag": true,
35-
"regexYFlag": true,
36-
"restParams": true,
37-
"spread": true,
38-
"superInFunctions": true,
39-
"templateStrings": true,
40-
"unicodeCodePointEscapes": true
41-
},
42-
43-
"rules": {
44-
"prettier/prettier": 2,
45-
46-
"arrow-parens": [2, "as-needed"],
47-
"arrow-spacing": 2,
48-
"block-scoped-var": 0,
49-
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
50-
"callback-return": 2,
51-
"camelcase": [2, {"properties": "always"}],
52-
"comma-dangle": 0,
53-
"comma-spacing": 0,
54-
"comma-style": [2, "last"],
55-
"complexity": 0,
56-
"computed-property-spacing": [2, "never"],
57-
"consistent-return": 0,
58-
"consistent-this": 0,
59-
"curly": [2, "all"],
60-
"default-case": 0,
61-
"dot-location": [2, "property"],
62-
"dot-notation": 0,
63-
"eol-last": 2,
64-
"eqeqeq": 2,
65-
"func-names": 0,
66-
"func-style": 0,
67-
"guard-for-in": 2,
68-
"handle-callback-err": [2, "error"],
69-
"id-length": 0,
70-
"id-match": [2, "^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$"],
71-
"indent": [2, 2, {"SwitchCase": 1}],
72-
"init-declarations": 0,
73-
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
74-
"keyword-spacing": 2,
75-
"linebreak-style": 2,
76-
"lines-around-comment": 0,
77-
"max-depth": 0,
78-
"max-nested-callbacks": 0,
79-
"max-params": 0,
80-
"max-statements": 0,
81-
"new-cap": 0,
82-
"new-parens": 2,
83-
"newline-after-var": 0,
84-
"no-alert": 2,
85-
"no-array-constructor": 2,
86-
"no-await-in-loop": 2,
87-
"no-bitwise": 0,
88-
"no-caller": 2,
89-
"no-catch-shadow": 0,
90-
"no-class-assign": 2,
91-
"no-cond-assign": 2,
92-
"no-console": 1,
93-
"no-const-assign": 2,
94-
"no-constant-condition": 2,
95-
"no-continue": 0,
96-
"no-control-regex": 0,
97-
"no-debugger": 1,
98-
"no-delete-var": 2,
99-
"no-div-regex": 2,
100-
"no-dupe-args": 2,
101-
"no-dupe-keys": 2,
102-
"no-duplicate-case": 2,
103-
"no-else-return": 2,
104-
"no-empty": 2,
105-
"no-empty-character-class": 2,
106-
"no-eq-null": 0,
107-
"no-eval": 2,
108-
"no-ex-assign": 2,
109-
"no-extend-native": 2,
110-
"no-extra-bind": 2,
111-
"no-extra-boolean-cast": 2,
112-
"no-extra-parens": 0,
113-
"no-extra-semi": 2,
114-
"no-fallthrough": 2,
115-
"no-floating-decimal": 2,
116-
"no-func-assign": 2,
117-
"no-implicit-coercion": 2,
118-
"no-implied-eval": 2,
119-
"no-inline-comments": 0,
120-
"no-inner-declarations": [2, "functions"],
121-
"no-invalid-regexp": 2,
122-
"no-invalid-this": 0,
123-
"no-irregular-whitespace": 2,
124-
"no-iterator": 2,
125-
"no-label-var": 2,
126-
"no-labels": [2, {"allowLoop": true}],
127-
"no-lone-blocks": 2,
128-
"no-lonely-if": 2,
129-
"no-loop-func": 0,
130-
"no-mixed-requires": [2, true],
131-
"no-mixed-spaces-and-tabs": 2,
132-
"no-multi-spaces": 2,
133-
"no-multi-str": 2,
134-
"no-multiple-empty-lines": 0,
135-
"no-native-reassign": 0,
136-
"no-negated-in-lhs": 2,
137-
"no-nested-ternary": 0,
138-
"no-new": 2,
139-
"no-new-func": 0,
140-
"no-new-object": 2,
141-
"no-new-require": 2,
142-
"no-new-wrappers": 2,
143-
"no-obj-calls": 2,
144-
"no-octal": 2,
145-
"no-octal-escape": 2,
146-
"no-param-reassign": 2,
147-
"no-path-concat": 2,
148-
"no-plusplus": 0,
149-
"no-process-env": 0,
150-
"no-process-exit": 0,
151-
"no-proto": 2,
152-
"no-redeclare": 2,
153-
"no-regex-spaces": 2,
154-
"no-restricted-modules": 0,
155-
"no-return-assign": 2,
156-
"no-script-url": 2,
157-
"no-self-compare": 0,
158-
"no-sequences": 2,
159-
"no-shadow": 2,
160-
"no-shadow-restricted-names": 2,
161-
"no-spaced-func": 2,
162-
"no-sparse-arrays": 2,
163-
"no-sync": 2,
164-
"no-ternary": 0,
165-
"no-this-before-super": 2,
166-
"no-throw-literal": 2,
167-
"no-trailing-spaces": 2,
168-
"no-undef": 2,
169-
"no-undef-init": 2,
170-
"no-undefined": 0,
171-
"no-underscore-dangle": 0,
172-
"no-unexpected-multiline": 2,
173-
"no-unneeded-ternary": 2,
174-
"no-unreachable": 2,
175-
"no-unused-expressions": 2,
176-
"no-unused-vars": [2, {"vars": "all", "args": "after-used"}],
177-
"no-use-before-define": 0,
178-
"no-useless-call": 2,
179-
"no-useless-escape": 2,
180-
"no-useless-return": 2,
181-
"no-var": 2,
182-
"no-void": 2,
183-
"no-warning-comments": 0,
184-
"no-with": 2,
185-
"object-curly-spacing": [0, "always"],
186-
"object-shorthand": [2, "always"],
187-
"one-var": [2, "never"],
188-
"operator-assignment": [2, "always"],
189-
"padded-blocks": 0,
190-
"prefer-const": 2,
191-
"prefer-reflect": 0,
192-
"prefer-spread": 0,
193-
"quote-props": [2, "as-needed", {"numbers": true}],
194-
"radix": 2,
195-
"require-yield": 2,
196-
"semi": [2, "always"],
197-
"semi-spacing": [2, {"before": false, "after": true}],
198-
"sort-vars": 0,
199-
"space-before-blocks": [2, "always"],
200-
"space-in-parens": 0,
201-
"space-infix-ops": [2, {"int32Hint": false}],
202-
"space-unary-ops": [2, {"words": true, "nonwords": false}],
203-
"spaced-comment": [2, "always"],
204-
"strict": 0,
205-
"use-isnan": 2,
206-
"valid-jsdoc": 0,
207-
"valid-typeof": 2,
208-
"vars-on-top": 0,
209-
"wrap-regex": 0,
210-
"yoda": [2, "never", {"exceptRange": true}]
9+
"typescript": true
21110
}
21211
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ To initiate the signature process please open a PR against this repo. The EasyCL
5050

5151
You can find [detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). If you have issues, please email [[email protected]](mailto:[email protected]).
5252

53-
If your company benefits from GraphQL and you would like to provide essential financial support for the systems and people that power our community, please also consider membership in the [GraphQL Foundation](https://foundation.graphql.org/join).
53+
If your company benefits from GraphQL and you would like to provide essential financial support for the systems and people that power our community, please also consider membership in the [GraphQL Foundation](https://foundation.graphql.org/join).

handler/graphql.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ import { createHandler } from 'graphql-http/lib/use/@netlify/functions';
1111
import schema from '../lib/schema';
1212

1313
// Create the GraphQL over HTTP native fetch handler
14-
export const handler = createHandler({ schema: schema.default });
14+
export const handler = createHandler({ schema });

jest.config.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

netlify.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
functions = "handler"
33
command = "npm run download && npm run build"
44
publish = "public/"
5+
6+
[watch]
7+
functions = "handler"
8+
command = "npm run download && npm run build"
9+
publish = "public/"
510
[[headers]]
611
for = "/graphql*"
712
[headers.values]

0 commit comments

Comments
 (0)