From 2369b06be2e72044b06b3f8c8fdea312daba91c9 Mon Sep 17 00:00:00 2001 From: Martijn Walraven Date: Sat, 11 Aug 2018 15:13:53 +0200 Subject: [PATCH] Use strict top-level tsconfig and fix type issues or override per-package --- packages/apollo-cache-control/tsconfig.json | 12 ++--------- packages/apollo-datasource-rest/tsconfig.json | 12 ++--------- packages/apollo-datasource/tsconfig.json | 12 ++--------- .../tsconfig.json | 2 +- .../apollo-engine-reporting/tsconfig.json | 12 ++--------- .../src/index.ts | 13 +++++++----- .../tsconfig.json | 11 ++-------- .../apollo-server-cache-redis/src/index.ts | 20 +++++++++++-------- .../apollo-server-cache-redis/tsconfig.json | 11 ++-------- packages/apollo-server-caching/tsconfig.json | 12 ++--------- .../src/cloudflareApollo.ts | 8 +------- .../apollo-server-cloudflare/tsconfig.json | 4 ++-- packages/apollo-server-core/tsconfig.json | 12 +++-------- .../src/polyfills/Object.values.ts | 10 +--------- packages/apollo-server-env/tsconfig.json | 11 ++-------- packages/apollo-server-errors/tsconfig.json | 10 ++-------- packages/apollo-server-express/tsconfig.json | 7 ++++--- packages/apollo-server-hapi/tsconfig.json | 8 +++++--- .../tsconfig.json | 6 ++++-- packages/apollo-server-koa/tsconfig.json | 8 +++++--- .../apollo-server-lambda/src/ApolloServer.ts | 2 +- .../apollo-server-lambda/src/lambdaApollo.ts | 4 ++-- packages/apollo-server-lambda/tsconfig.json | 7 +++---- packages/apollo-server-micro/tsconfig.json | 7 ++++--- packages/apollo-server/src/index.ts | 18 +++++++++-------- packages/apollo-server/tsconfig.json | 8 +++----- packages/apollo-tracing/tsconfig.json | 12 ++--------- packages/graphql-extensions/tsconfig.json | 12 ++--------- tsconfig.json | 7 +++++-- 29 files changed, 96 insertions(+), 182 deletions(-) diff --git a/packages/apollo-cache-control/tsconfig.json b/packages/apollo-cache-control/tsconfig.json index af4fe84390d..b8b81721105 100644 --- a/packages/apollo-cache-control/tsconfig.json +++ b/packages/apollo-cache-control/tsconfig.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "removeComments": true, - "strict": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "types": ["node"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-datasource-rest/tsconfig.json b/packages/apollo-datasource-rest/tsconfig.json index af4fe84390d..b8b81721105 100644 --- a/packages/apollo-datasource-rest/tsconfig.json +++ b/packages/apollo-datasource-rest/tsconfig.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "removeComments": true, - "strict": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "types": ["node"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-datasource/tsconfig.json b/packages/apollo-datasource/tsconfig.json index af4fe84390d..b8b81721105 100644 --- a/packages/apollo-datasource/tsconfig.json +++ b/packages/apollo-datasource/tsconfig.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "removeComments": true, - "strict": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "types": ["node"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-engine-reporting-protobuf/tsconfig.json b/packages/apollo-engine-reporting-protobuf/tsconfig.json index 95c6a1d3e8f..b8b81721105 100644 --- a/packages/apollo-engine-reporting-protobuf/tsconfig.json +++ b/packages/apollo-engine-reporting-protobuf/tsconfig.json @@ -5,5 +5,5 @@ "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-engine-reporting/tsconfig.json b/packages/apollo-engine-reporting/tsconfig.json index af4fe84390d..b8b81721105 100644 --- a/packages/apollo-engine-reporting/tsconfig.json +++ b/packages/apollo-engine-reporting/tsconfig.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "removeComments": true, - "strict": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "types": ["node"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-cache-memcached/src/index.ts b/packages/apollo-server-cache-memcached/src/index.ts index 5bbd834a268..8def3433269 100644 --- a/packages/apollo-server-cache-memcached/src/index.ts +++ b/packages/apollo-server-cache-memcached/src/index.ts @@ -3,17 +3,20 @@ import * as Memcached from 'memcached'; import { promisify } from 'util'; export class MemcachedCache implements KeyValueCache { - readonly client; + // FIXME: Replace any with proper promisified type + readonly client: any; readonly defaultSetOptions = { ttl: 300, }; constructor(serverLocation: Memcached.Location, options?: Memcached.options) { - this.client = new Memcached(serverLocation, options); + const client = new Memcached(serverLocation, options); // promisify client calls for convenience - this.client.get = promisify(this.client.get).bind(this.client); - this.client.set = promisify(this.client.set).bind(this.client); - this.client.flush = promisify(this.client.flush).bind(this.client); + client.get = promisify(client.get).bind(client); + client.set = promisify(client.set).bind(client); + client.flush = promisify(client.flush).bind(client); + + this.client = client; } async set( diff --git a/packages/apollo-server-cache-memcached/tsconfig.json b/packages/apollo-server-cache-memcached/tsconfig.json index beb89f30836..b8b81721105 100644 --- a/packages/apollo-server-cache-memcached/tsconfig.json +++ b/packages/apollo-server-cache-memcached/tsconfig.json @@ -2,15 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "removeComments": true, - "strict": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "types": ["node"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-cache-redis/src/index.ts b/packages/apollo-server-cache-redis/src/index.ts index c2088ef95aa..c436ce680b0 100644 --- a/packages/apollo-server-cache-redis/src/index.ts +++ b/packages/apollo-server-cache-redis/src/index.ts @@ -4,7 +4,8 @@ import { promisify } from 'util'; import * as DataLoader from 'dataloader'; export class RedisCache implements KeyValueCache { - readonly client; + // FIXME: Replace any with proper promisified type + readonly client: any; readonly defaultSetOptions = { ttl: 300, }; @@ -12,16 +13,19 @@ export class RedisCache implements KeyValueCache { private loader: DataLoader; constructor(options: Redis.ClientOpts) { - this.client = Redis.createClient(options); + const client = Redis.createClient(options); + + // promisify client calls for convenience + client.mget = promisify(client.mget).bind(client); + client.set = promisify(client.set).bind(client); + client.flushdb = promisify(client.flushdb).bind(client); + client.quit = promisify(client.quit).bind(client); + + this.client = client; + this.loader = new DataLoader(keys => this.client.mget(keys), { cache: false, }); - - // promisify client calls for convenience - this.client.mget = promisify(this.client.mget).bind(this.client); - this.client.set = promisify(this.client.set).bind(this.client); - this.client.flushdb = promisify(this.client.flushdb).bind(this.client); - this.client.quit = promisify(this.client.quit).bind(this.client); } async set( diff --git a/packages/apollo-server-cache-redis/tsconfig.json b/packages/apollo-server-cache-redis/tsconfig.json index beb89f30836..b8b81721105 100644 --- a/packages/apollo-server-cache-redis/tsconfig.json +++ b/packages/apollo-server-cache-redis/tsconfig.json @@ -2,15 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "removeComments": true, - "strict": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "types": ["node"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-caching/tsconfig.json b/packages/apollo-server-caching/tsconfig.json index af4fe84390d..b8b81721105 100644 --- a/packages/apollo-server-caching/tsconfig.json +++ b/packages/apollo-server-caching/tsconfig.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "removeComments": true, - "strict": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "types": ["node"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-cloudflare/src/cloudflareApollo.ts b/packages/apollo-server-cloudflare/src/cloudflareApollo.ts index ecdfefebc02..96ffcdbe3fe 100644 --- a/packages/apollo-server-cloudflare/src/cloudflareApollo.ts +++ b/packages/apollo-server-cloudflare/src/cloudflareApollo.ts @@ -47,15 +47,9 @@ export function graphqlCloudflare(options: GraphQLOptions) { const res = new Response(error.message, { status: error.statusCode, - headers: { 'content-type': 'application/json' }, + headers: error.headers, }); - if (error.headers) { - Object.keys(error.headers).forEach(header => { - res.headers[header] = error.headers[header]; - }); - } - return res; }, ); diff --git a/packages/apollo-server-cloudflare/tsconfig.json b/packages/apollo-server-cloudflare/tsconfig.json index 70150c645cb..b8b81721105 100644 --- a/packages/apollo-server-cloudflare/tsconfig.json +++ b/packages/apollo-server-cloudflare/tsconfig.json @@ -1,9 +1,9 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-core/tsconfig.json b/packages/apollo-server-core/tsconfig.json index b3d6896a725..b8b81721105 100644 --- a/packages/apollo-server-core/tsconfig.json +++ b/packages/apollo-server-core/tsconfig.json @@ -1,15 +1,9 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "strict": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-env/src/polyfills/Object.values.ts b/packages/apollo-server-env/src/polyfills/Object.values.ts index 6f3409b2e7e..e69754c26f7 100644 --- a/packages/apollo-server-env/src/polyfills/Object.values.ts +++ b/packages/apollo-server-env/src/polyfills/Object.values.ts @@ -1,13 +1,5 @@ -interface ObjectConstructor { - /** - * Returns an array of values of the enumerable properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: { [s: string]: T } | ArrayLike): T[]; -} - if (!global.Object.values) { - global.Object.values = function(o) { + global.Object.values = function(o: any) { return Object.keys(o).map(key => o[key]); }; } diff --git a/packages/apollo-server-env/tsconfig.json b/packages/apollo-server-env/tsconfig.json index a7cc54c645b..a279d2621cd 100644 --- a/packages/apollo-server-env/tsconfig.json +++ b/packages/apollo-server-env/tsconfig.json @@ -5,15 +5,8 @@ "outDir": "./dist", "allowJs": true, "declaration": false, - "declarationMap": false, - "removeComments": true, - "strict": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true + "declarationMap": false }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"], - "types": [] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-errors/tsconfig.json b/packages/apollo-server-errors/tsconfig.json index beb89f30836..fbed8c00866 100644 --- a/packages/apollo-server-errors/tsconfig.json +++ b/packages/apollo-server-errors/tsconfig.json @@ -3,14 +3,8 @@ "compilerOptions": { "rootDir": "./src", "outDir": "./dist", - "removeComments": true, - "strict": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "types": ["node"] + "noImplicitAny": false }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-express/tsconfig.json b/packages/apollo-server-express/tsconfig.json index 99f53e2ef72..1fb1071218e 100644 --- a/packages/apollo-server-express/tsconfig.json +++ b/packages/apollo-server-express/tsconfig.json @@ -1,10 +1,11 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", "outDir": "./dist", - "lib": ["es2017", "esnext.asynciterable", "dom"] + "noImplicitAny": false, + "strictNullChecks": false }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-hapi/tsconfig.json b/packages/apollo-server-hapi/tsconfig.json index 99f53e2ef72..4f9532c3555 100644 --- a/packages/apollo-server-hapi/tsconfig.json +++ b/packages/apollo-server-hapi/tsconfig.json @@ -1,10 +1,12 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", "outDir": "./dist", - "lib": ["es2017", "esnext.asynciterable", "dom"] + "noImplicitAny": false, + "noImplicitThis": false, + "strictNullChecks": false }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-integration-testsuite/tsconfig.json b/packages/apollo-server-integration-testsuite/tsconfig.json index 99f53e2ef72..1fc001ddcc5 100644 --- a/packages/apollo-server-integration-testsuite/tsconfig.json +++ b/packages/apollo-server-integration-testsuite/tsconfig.json @@ -1,10 +1,12 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", "outDir": "./dist", + "noImplicitAny": false, + "strictNullChecks": false, "lib": ["es2017", "esnext.asynciterable", "dom"] }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-koa/tsconfig.json b/packages/apollo-server-koa/tsconfig.json index 99f53e2ef72..967b4d28b36 100644 --- a/packages/apollo-server-koa/tsconfig.json +++ b/packages/apollo-server-koa/tsconfig.json @@ -1,10 +1,12 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", "outDir": "./dist", - "lib": ["es2017", "esnext.asynciterable", "dom"] + "noImplicitAny": false, + "strictNullChecks": false, + "noImplicitReturns": false }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-lambda/src/ApolloServer.ts b/packages/apollo-server-lambda/src/ApolloServer.ts index 88ec625b5ce..94a58c059dc 100644 --- a/packages/apollo-server-lambda/src/ApolloServer.ts +++ b/packages/apollo-server-lambda/src/ApolloServer.ts @@ -44,7 +44,7 @@ export class ApolloServer extends ApolloServerBase { } public createHandler({ cors }: CreateHandlerOptions = { cors: undefined }) { - const corsHeaders = {}; + const corsHeaders: lambda.APIGatewayProxyResult['headers'] = {}; if (cors) { if (cors.methods) { diff --git a/packages/apollo-server-lambda/src/lambdaApollo.ts b/packages/apollo-server-lambda/src/lambdaApollo.ts index 21ca42a7d02..3e77c55343a 100644 --- a/packages/apollo-server-lambda/src/lambdaApollo.ts +++ b/packages/apollo-server-lambda/src/lambdaApollo.ts @@ -42,9 +42,9 @@ export function graphqlLambda( method: event.httpMethod, options: options, query: - event.httpMethod === 'POST' + event.httpMethod === 'POST' && event.body ? JSON.parse(event.body) - : (event.queryStringParameters as any), + : event.queryStringParameters, request: { url: event.path, method: event.httpMethod, diff --git a/packages/apollo-server-lambda/tsconfig.json b/packages/apollo-server-lambda/tsconfig.json index 99f53e2ef72..b8b81721105 100644 --- a/packages/apollo-server-lambda/tsconfig.json +++ b/packages/apollo-server-lambda/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "lib": ["es2017", "esnext.asynciterable", "dom"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server-micro/tsconfig.json b/packages/apollo-server-micro/tsconfig.json index 99f53e2ef72..1fb1071218e 100644 --- a/packages/apollo-server-micro/tsconfig.json +++ b/packages/apollo-server-micro/tsconfig.json @@ -1,10 +1,11 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", "outDir": "./dist", - "lib": ["es2017", "esnext.asynciterable", "dom"] + "noImplicitAny": false, + "strictNullChecks": false }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-server/src/index.ts b/packages/apollo-server/src/index.ts index 6d5686d27a8..9d94265fbcd 100644 --- a/packages/apollo-server/src/index.ts +++ b/packages/apollo-server/src/index.ts @@ -24,7 +24,7 @@ export interface ServerInfo { } export class ApolloServer extends ApolloServerBase { - private httpServer: http.Server; + private httpServer?: http.Server; private cors?: CorsOptions | boolean; constructor(config: Config & { cors?: CorsOptions | boolean }) { @@ -95,27 +95,29 @@ export class ApolloServer extends ApolloServerBase { }, }); - this.httpServer = http.createServer(app); + const httpServer = http.createServer(app); + this.httpServer = httpServer; if (this.subscriptionServerOptions) { - this.installSubscriptionHandlers(this.httpServer); + this.installSubscriptionHandlers(httpServer); } await new Promise(resolve => { - this.httpServer.once('listening', resolve); + httpServer.once('listening', resolve); // If the user passed a callback to listen, it'll get called in addition // to our resolver. They won't have the ability to get the ServerInfo // object unless they use our Promise, though. - this.httpServer.listen(...(opts.length ? opts : [{ port: 4000 }])); + httpServer.listen(...(opts.length ? opts : [{ port: 4000 }])); }); - return this.createServerInfo(this.httpServer, this.subscriptionsPath); + return this.createServerInfo(httpServer, this.subscriptionsPath); } public async stop() { if (this.httpServer) { - await new Promise(resolve => this.httpServer.close(resolve)); - this.httpServer = null; + const httpServer = this.httpServer; + await new Promise(resolve => httpServer.close(resolve)); + this.httpServer = undefined; } await super.stop(); } diff --git a/packages/apollo-server/tsconfig.json b/packages/apollo-server/tsconfig.json index 365decbb5b9..b8b81721105 100644 --- a/packages/apollo-server/tsconfig.json +++ b/packages/apollo-server/tsconfig.json @@ -1,11 +1,9 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "noImplicitAny": true, - "lib": ["es2017", "esnext.asynciterable", "dom"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/apollo-tracing/tsconfig.json b/packages/apollo-tracing/tsconfig.json index af4fe84390d..b8b81721105 100644 --- a/packages/apollo-tracing/tsconfig.json +++ b/packages/apollo-tracing/tsconfig.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "removeComments": true, - "strict": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "types": ["node"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/packages/graphql-extensions/tsconfig.json b/packages/graphql-extensions/tsconfig.json index af4fe84390d..b8b81721105 100644 --- a/packages/graphql-extensions/tsconfig.json +++ b/packages/graphql-extensions/tsconfig.json @@ -2,16 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "removeComments": true, - "strict": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "types": ["node"] + "outDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "**/__tests__/*", "**/__mocks__/*"] + "exclude": ["**/__tests__", "**/__mocks__"] } diff --git a/tsconfig.json b/tsconfig.json index 2e18261545e..bcb9b791710 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,10 +6,13 @@ "sourceMap": true, "declaration": true, "declarationMap": true, - "noImplicitAny": false, "removeComments": true, - "noUnusedLocals": true, + "strict": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, "noUnusedParameters": true, + "noUnusedLocals": true, "forceConsistentCasingInFileNames": true, "lib": ["es2017", "esnext.asynciterable"], "types": ["node", "jest"]