From 7052e88068025aa5547f3c96d740283045bbbc2c Mon Sep 17 00:00:00 2001 From: Kabir Baidhya Date: Mon, 28 Oct 2019 23:17:49 +0545 Subject: [PATCH] Resolve deprecation warning message from eslint while running eslint (#1586) * Resolve eslint deprecation warning There was a DeprecationWarning message from eslint saying that `ecmaFeatures` property has been deprecated. Moved it under the `parserOptions` as per recommended here - https://eslint.org/docs/user-guide/migrating-to-2.0.0. * Set escmaVersion = 6 * Use ES6 built-in global variables * Remove flags in favor of ecmaVersion --- .eslintrc.js | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 34daed78d..0b71556ff 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,22 +4,8 @@ module.exports = { "self": false }, "env": { - "node": true - }, - "ecmaFeatures": { - // Enabling features that can be implemented without polyfills. Want to avoid polyfills at this time. - "arrowFunctions": true, - "blockBindings": true, - "defaultParams": true, - "destructuring": true, - "modules": true, - "objectLiteralComputedProperties": true, - "objectLiteralDuplicateProperties": true, - "objectLiteralShorthandMethods": true, - "objectLiteralShorthandProperties": true, - "restParams": true, - "spread": true, - "templateStrings": true + "node": true, + "es6": true }, "rules": { // overrides eslint:recommended defaults @@ -124,6 +110,8 @@ module.exports = { "no-var": "warn" }, "parserOptions": { - "sourceType": "module" + "sourceType": "module", + "ecmaVersion": 6, + "ecmaFeatures": {} } -} \ No newline at end of file +}