From 348b5927e6f2560e2301aed366d2c153d956c7fe Mon Sep 17 00:00:00 2001 From: Vitaly Kramskikh Date: Wed, 10 Aug 2016 17:32:47 +0300 Subject: [PATCH] Update eslint and eslint-config-openstack to latest versions The newest eslint-config-openstack provides all the ES2015-related extra rules we had in the local .eslintrc, so that they can be removed. Also, cloudsYamlPath.js was modified to adapt to `keyword-spacing` rule modifications in eslint v3. Change-Id: I55198a323a0ada7a74f425d21db42306d9548cb7 --- .eslintrc | 27 +---------------------- package.json | 4 ++-- test/functional/helpers/cloudsYamlPath.js | 2 +- 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/.eslintrc b/.eslintrc index 5891fe4..7108359 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,26 +1 @@ -extends: openstack - -parserOptions: - ecmaVersion: 6 - sourceType: module - -rules: - # disallow unnecessary .call() and .apply() - # http://eslint.org/docs/rules/no-useless-call - no-useless-call: 2 - - # require let or const instead of var - # http://eslint.org/docs/rules/no-var - no-var: 2 - - # suggest using arrow functions as callbacks - # http://eslint.org/docs/rules/prefer-arrow-callback - prefer-arrow-callback: 2 - - # suggest using the spread operator instead of .apply(). - # http://eslint.org/docs/rules/prefer-spread - prefer-spread: 2 - - # suggest using the rest parameters instead of arguments - # http://eslint.org/docs/rules/prefer-rest-params - prefer-rest-params: 2 +extends: openstack/es2015 diff --git a/package.json b/package.json index 685ae0a..bff096c 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,8 @@ "babel-plugin-transform-inline-environment-variables": "^6.8.0", "babel-preset-es2015": "^6.9.0", "babel-register": "^6.9.0", - "eslint": "^2.4.0", - "eslint-config-openstack": "2.0.0", + "eslint": "^3.0.0", + "eslint-config-openstack": "4.0.1", "fetch-mock": "^5.0.5", "istanbul": "^1.0.0-alpha.2", "jasmine": "^2.4.1", diff --git a/test/functional/helpers/cloudsYamlPath.js b/test/functional/helpers/cloudsYamlPath.js index 64df69f..a07a6a4 100644 --- a/test/functional/helpers/cloudsYamlPath.js +++ b/test/functional/helpers/cloudsYamlPath.js @@ -12,7 +12,7 @@ function fileExists(path) { try { fs.statSync(path); return true; - } catch(err) { + } catch (err) { return false; } }