From 47af18af9ddc90730089b7da873fc73a70240f0b Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Wed, 5 Jun 2019 17:24:02 +0100 Subject: [PATCH] add lint npm script --- .eslintrc.json | 3 +++ package.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8962be6600..0673b0a943 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -22,6 +22,9 @@ "arrow-spacing": 2, "no-inner-declarations": 0, "@typescript-eslint/indent": [2, "tab", { "SwitchCase": 1 }], + "@typescript-eslint/explicit-function-return-type": ["error", { + "allowExpressions": true + }], "@typescript-eslint/camelcase": "off" }, "env": { diff --git a/package.json b/package.json index 1092978f05..9dbee54529 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "prepublishOnly": "export PUBLISH=true && npm test && npm run create-stubs", "create-stubs": "node scripts/create-stubs.js", "tsd": "tsc -p . --emitDeclarationOnly", - "typecheck": "tsc -p . --noEmit" + "typecheck": "tsc -p . --noEmit", + "lint": "eslint \"{src,test}/**/*.{ts,js}\"" }, "repository": { "type": "git",