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'], + }, };