From b3592b6f777931f845c648fb5a87b08510589f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ch=C5=82odnicki?= Date: Fri, 23 Aug 2019 19:54:20 +0200 Subject: [PATCH] style(test): add eslint configuration for unit tests (#2518) * style(test): add eslint configuration for unit tests * style(test): move test-specific eslint configuration to test/unit --- package.json | 3 ++- test/unit/.eslintrc | 8 ++++++++ yarn.lock | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/unit/.eslintrc diff --git a/package.json b/package.json index 7122fc908..59aa08442 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dev": "node examples/server.js", "dev:dist": "rollup -wm -c build/rollup.dev.config.js", "build": "node build/build.js", - "lint": "eslint src test examples", + "lint": "eslint src examples test", "test": "npm run lint && npm run flow && npm run test:unit && npm run test:e2e && npm run test:types", "flow": "flow check", "test:unit": "jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json", @@ -70,6 +70,7 @@ "es6-promise": "^4.2.8", "eslint": "^4.19.1", "eslint-plugin-flowtype": "^2.46.1", + "eslint-plugin-jasmine": "^2.10.1", "eslint-plugin-vue-libs": "^2.1.0", "express": "^4.17.1", "express-urlrewrite": "^1.2.0", diff --git a/test/unit/.eslintrc b/test/unit/.eslintrc new file mode 100644 index 000000000..3feebfd41 --- /dev/null +++ b/test/unit/.eslintrc @@ -0,0 +1,8 @@ +{ + "env": { + "jasmine": true + }, + "plugins": [ + "jasmine" + ] +} diff --git a/yarn.lock b/yarn.lock index 85b8ed9dd..46570e9dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4077,6 +4077,11 @@ eslint-plugin-html@^4.0.1: dependencies: htmlparser2 "^3.8.2" +eslint-plugin-jasmine@^2.10.1: + version "2.10.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jasmine/-/eslint-plugin-jasmine-2.10.1.tgz#5733b709e751f4bc40e31e1c16989bd2cdfbec97" + integrity sha1-VzO3CedR9LxA4x4cFpib0s377Jc= + eslint-plugin-vue-libs@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-vue-libs/-/eslint-plugin-vue-libs-2.1.0.tgz#e7faf4ae11dad58553f63f907d6642e2d816dcef"