diff --git a/src/dev/typescript/projects.ts b/src/dev/typescript/projects.ts index b93d3a0ac5371..447d5d70ba213 100644 --- a/src/dev/typescript/projects.ts +++ b/src/dev/typescript/projects.ts @@ -42,5 +42,5 @@ export function filterProjectsByFlag(projectFlag?: string) { } const tsConfigPath = resolve(projectFlag); - return PROJECTS.filter(project => project.tsConfigPath === tsConfigPath); + return PROJECTS.filter(project => project.tsConfigPath.includes(tsConfigPath)); } diff --git a/tslint.yaml b/tslint.yaml index e65bb1e931aa7..1da41b7b71c72 100644 --- a/tslint.yaml +++ b/tslint.yaml @@ -32,3 +32,7 @@ rules: * specific language governing permissions and limitations * under the License. */ + +linterOptions: + exclude: + - ./**/*.json diff --git a/x-pack/plugins/apm/typings/global_types.d.ts b/x-pack/plugins/apm/typings/global_types.d.ts deleted file mode 100644 index ba1e9e998727f..0000000000000 --- a/x-pack/plugins/apm/typings/global_types.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -// allow JSON files to be imported directly without TSLint errors -// see: https://github.com/palantir/tslint/issues/1264#issuecomment-228433367 -// and: https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#arbitrary-expressions-are-forbidden-in-export-assignments-in-ambient-contexts -declare module '*.json' { - const json: any; - export default json; -} diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json index 0f4b296e666b6..cbc59ed44ecbb 100644 --- a/x-pack/tsconfig.json +++ b/x-pack/tsconfig.json @@ -10,6 +10,7 @@ "test/**/*" ], "compilerOptions": { + "resolveJsonModule": true, "paths": { "ui/*": [ "src/ui/public/*"