From 0df878a860c510393e2ce4f1e5dd6e16006d05b9 Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Sat, 2 Sep 2017 15:10:14 +0200 Subject: [PATCH] Add Object rest spread to eslint and babel configs Also change from `eslint-plugin-html` to `eslint-plugin-vue` --- .babelrc | 2 +- .eslintrc.json | 6 +++++- package.json | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.babelrc b/.babelrc index 6934f785..02412e8f 100644 --- a/.babelrc +++ b/.babelrc @@ -1,5 +1,5 @@ { - "presets": ["es2015"], + "presets": ["es2015", "stage-3"], "plugins": ["transform-runtime"], "comments": false } diff --git a/.eslintrc.json b/.eslintrc.json index ae4a4883..46c3cbe3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,9 @@ { "root": true, "parserOptions": { + "ecmaFeatures": { + "experimentalObjectRestSpread": true + }, "ecmaVersion": 6, "sourceType": "module" }, @@ -8,11 +11,12 @@ "browser": true }, "extends": "eslint:recommended", - "plugins": [ "html" ], + "plugins": ["vue"], "rules": { "indent": ["error", 4, { "SwitchCase": 1 }], "quotes": ["error", "single"], "semi": ["error", "always"], + "vue/jsx-uses-vars": 2, "no-console": ["error"] } } diff --git a/package.json b/package.json index 7b1ffeb5..fbc4531f 100644 --- a/package.json +++ b/package.json @@ -56,12 +56,13 @@ "babel-loader": "^6.4.1", "babel-plugin-transform-runtime": "^6.12.0", "babel-preset-es2015": "^6.24.1", + "babel-preset-stage-3": "^6.24.1", "babel-runtime": "^6.11.6", "chai": "^3.5.0", "cross-env": "^3.2.4", "css-loader": "^0.23.1", "eslint": "^3.19.0", - "eslint-plugin-html": "^1.7.0", + "eslint-plugin-vue": "^2.1.0", "extract-text-webpack-plugin": "^2.1.2", "file-loader": "^0.8.5", "friendly-errors-webpack-plugin": "^1.6.1",