mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
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:
parent
2160ad5035
commit
8b7878fdc6
@ -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
|
||||
|
@ -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(
|
||||
|
@ -26,7 +26,7 @@
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json"
|
||||
"project": "./tsconfig.eslint.json"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
|
7
language-support/ts/daml-types/tsconfig.eslint.json
Normal file
7
language-support/ts/daml-types/tsconfig.eslint.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"files": [
|
||||
"index.ts",
|
||||
"index.test.ts"
|
||||
]
|
||||
}
|
@ -15,9 +15,5 @@
|
||||
"declaration": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": [
|
||||
"**/*.test.ts",
|
||||
"lib/**/*"
|
||||
]
|
||||
"files": ["index.ts"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user