Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The rule vue/require-direct-export does not support functional components #1197

Closed
danyadev opened this issue Jun 6, 2020 · 0 comments · Fixed by #1199
Closed

The rule vue/require-direct-export does not support functional components #1197

danyadev opened this issue Jun 6, 2020 · 0 comments · Fixed by #1199

Comments

@danyadev
Copy link
Contributor

danyadev commented Jun 6, 2020

Tell us about your environment

  • ESLint version: 7.2.0
  • eslint-plugin-vue version: 7.0.0-alpha.5
  • Node version: v12.16.3

Please show your full configuration:

module.exports = {
  root: true,

  parserOptions: {
    sourceType: 'module'
  },

  env: {
    browser: true,
    node: true,
    es2020: true
  },

  plugins: ['import'],

  settings: {
    'import/resolver': 'webpack',
    'import/ignore': []
  },

  extends: ['plugin:vue/vue3-recommended'],

  rules: {
    // *eslint rules*
    // *import rules*
    // *other vue rules*

    'vue/require-direct-export': 'error'
  }
};

What did you do?

<script>
import { h } from 'vue';

export default function Test() {
  return h('div', 'functional component content');
}
</script>

What did you expect to happen?
No errors

What actually happened?

4:1  error  Expected the component literal to be directly exported  vue/require-direct-export
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant