aboutsummaryrefslogtreecommitdiff
path: root/package.json
diff options
context:
space:
mode:
authorJack Franklin <[email protected]>2020-05-27 18:39:01 +0100
committerGitHub <[email protected]>2020-05-27 13:39:01 -0400
commiteb2be7caf6c88a41a184ef5ea6e4675f0f372771 (patch)
tree1e17bf59398b1cff97c5e2711b484edd8f9f8c8c /package.json
parent59cc3d1bc3b85d347baa8883b6206ba88a6071c0 (diff)
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
Diffstat (limited to 'package.json')
-rw-r--r--package.json11
1 files changed, 9 insertions, 2 deletions
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",