Skip to content

Commit d5d685f

Browse files
authored
Merge pull request #17 from PolymerLabs/check-output
Check that test output compiles and lints
2 parents 15eea98 + 72cdb7a commit d5d685f

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
],
1010
"rules": {
1111
"@typescript-eslint/no-use-before-define": ["error", "nofunc"],
12-
"@typescript-eslint/explicit-function-return-type": "off"
12+
"@typescript-eslint/explicit-function-return-type": "off",
13+
"semi": "error"
1314
}
1415
}

.github/workflows/tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ jobs:
3232

3333
- name: AVA unit tests
3434
run: npx ava
35+
36+
- name: Check test output TypeScript
37+
run: npm run test:check-tsc
38+
39+
- name: Check test output eslint
40+
run: npm run test:check-eslint

package-lock.json

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
"clean": "rimraf 'lib/*' 'lib/.*' 'testdata/*/output'",
1717
"build": "npm run clean && npm run generate-json-schema && tsc",
1818
"generate-json-schema": "typescript-json-schema src/config.ts Config --required --noExtraProps > config.schema.json",
19-
"test": "npm run build && ava --verbose",
19+
"test": "npm run build && ava --verbose && npm run test:check-tsc && npm run test:check-eslint",
2020
"test:update-goldens": "npm run build && UPDATE_TEST_GOLDENS=true ava --verbose",
21-
"lint": "eslint 'src/**/*.ts' --max-warnings 0",
21+
"test:check-tsc": "ls testdata/*/output/tsconfig.json | xargs -n 1 tsc --noEmit --project",
22+
"test:check-eslint": "eslint 'testdata/*/output/*.ts' 'testdata/*/output/**/*.ts' --max-warnings 0",
23+
"lint": "eslint 'src/*.ts' 'src/**/*.ts' --max-warnings 0",
2224
"prettier": "prettier 'src/**/*.ts'",
2325
"format:check": "npm run prettier -- --check",
2426
"format": "npm run prettier -- --write",
@@ -48,6 +50,7 @@
4850
"dir-compare": "^2.3.0",
4951
"eslint": "^6.8.0",
5052
"fs-extra": "^9.0.0",
53+
"lit-html": "^1.2.1",
5154
"prettier": "^2.0.5",
5255
"rimraf": "^3.0.2",
5356
"typescript": "^3.8.3",

scripts/watch.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ npx chokidar \
1818
"lib/**/*.js" \
1919
"config.schema.json" \
2020
"testdata/*/input/**/*" \
21-
"testdata/*/golden/**/*" \
22-
"ava.config.js" -c "ava" &
21+
"testdata/*/goldens/" \
22+
"ava.config.js" \
23+
-c "ava; npm run test:check-tsc; npm run test:check-eslint" &
2324

2425
wait

0 commit comments

Comments
 (0)