From eb2be7caf6c88a41a184ef5ea6e4675f0f372771 Mon Sep 17 00:00:00 2001 From: Jack Franklin Date: Wed, 27 May 2020 18:39:01 +0100 Subject: Export Mitt types for TS consumers (#101) * Export Mitt types for TS consumers * Add rudimentary tests for exported TS types * Run tests against the generated output instead of src --- package.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 08b12d2..36fb941 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,10 @@ "umd:main": "dist/mitt.umd.js", "typings": "dist/index.d.ts", "scripts": { - "testonly": "mocha --require esm --require ts-node/register test/**/*.js", + "test": "npm-run-all --silent typecheck lint testonly", + "testonly": "mocha --require esm test/**/*.js", "lint": "eslint src test --ext ts --ext js", - "test": "tsc src/index.ts --noEmit && npm run lint && npm run testonly", + "typecheck": "tsc **/*.ts --noEmit", "bundle": "microbundle", "build": "npm-run-all --silent clean -p bundle -s docs", "clean": "rimraf dist", @@ -23,6 +24,7 @@ "keywords": [ "events", "eventemitter", + "emitter", "pubsub" ], "homepage": "https://github.com/developit/mitt", @@ -47,6 +49,7 @@ "env": { "browser": true, "mocha": true, + "jest": false, "es6": true }, "globals": { @@ -57,12 +60,16 @@ 2, "always" ], + "jest/valid-expect": 0, "@typescript-eslint/no-explicit-any": 0, "@typescript-eslint/explicit-function-return-type": 0, "@typescript-eslint/explicit-module-boundary-types": 0, "@typescript-eslint/no-empty-function": 0 } }, + "eslintIgnore": [ + "dist" + ], "devDependencies": { "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", -- cgit v1.2.3