From 5cdeb22429654932b3d5a484333f454a04bc37af Mon Sep 17 00:00:00 2001 From: Vaillant Samuel Date: Fri, 1 Jun 2018 12:44:05 +0200 Subject: [PATCH] fix(vue): avoid extends from base --- vue.js | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/vue.js b/vue.js index f645ea11..c8d2c098 100644 --- a/vue.js +++ b/vue.js @@ -1,6 +1,35 @@ +// We don't extends from the `base` preset because the Vue plugin needs +// to use the parser under `parserOptions`. By doing this we broke the import +// plugin in the `react` preset. For now we just recreate the same configuration +// until all the plugins behave the same. + // eslint-disable-next-line import/no-commonjs module.exports = { - // later we add vue-specific prettier extends here - extends: ['plugin:vue/strongly-recommended', './rules/vue.js', './base.js'], - plugins: ['vue'], + env: { + browser: true, + es6: true, + node: true, + }, + parserOptions: { + parser: 'babel-eslint', // allows both flowtype and static class properties + ecmaVersion: 6, + sourceType: 'module', + ecmaFeatures: { + experimentalObjectRestSpread: true, + impliedStrict: true, + jsx: true, + }, + }, + extends: [ + 'plugin:vue/strongly-recommended', + 'eslint:recommended', + 'plugin:import/errors', + './rules/base.js', + 'prettier', + './rules/vue.js', + ], + plugins: ['import', 'prettier'], + settings: { + 'import/extensions': ['.js'], + }, };