daml-types.ts: Lint tests as well (#4208)

* daml-types.ts: Lint tests as well

Also simplify file selection a bit.

CHANGELOG_BEGIN
CHANGELOG_END

* Fix build command in test script

CHANGELOG_BEGIN
CHANGELOG_END
This commit is contained in:
Martin Huschenbett 2020-01-25 08:38:10 +01:00 committed by mergify[bot]
parent 2160ad5035
commit 8b7878fdc6
5 changed files with 14 additions and 12 deletions

View File

@ -48,7 +48,7 @@ cd $TMP_DIR
$DAML2TS -o generated/src/daml --main-package-name daml-tests $DAR
sed -i "s/0.0.0-SDKVERSION/${VERSION}/" generated/package.json
$YARN install --frozen-lockfile
$YARN workspaces run build
cd generated
$YARN build
$YARN lint
JAVA=$JAVA SANDBOX=$SANDBOX JSON_API=$JSON_API DAR=$DAR $YARN test

View File

@ -12,10 +12,7 @@ load("@sdk_version//:sdk_version.bzl", "sdk_version")
ts_library(
name = "daml-types",
srcs = glob(
["**/*.ts"],
exclude = ["**/*.test.ts"],
),
srcs = glob(["**/*.ts"]),
data = [
":LICENSE",
":package.json",
@ -42,8 +39,10 @@ eslint_test(
name = "lint",
srcs = glob(
["**/*.ts"],
exclude = ["**/*.test.ts"],
exclude = ["lib/**/*"],
),
data = ["tsconfig.json"],
tsconfig = "tsconfig.eslint.json",
)
pkg_npm(

View File

@ -26,7 +26,7 @@
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
"project": "./tsconfig.eslint.json"
},
"plugins": [
"@typescript-eslint"

View File

@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"files": [
"index.ts",
"index.test.ts"
]
}

View File

@ -15,9 +15,5 @@
"declaration": true,
"sourceMap": true
},
"include": ["**/*.ts"],
"exclude": [
"**/*.test.ts",
"lib/**/*"
]
"files": ["index.ts"]
}