Skip to content

Check fails if a .vue file contains no <script> tag #1

@Twiknight

Description

@Twiknight

If a .vue file contains no <script> tag, eslint would throw following error:

Module build failed: TypeError: Cannot read property 'forEach' of undefined

This is the consequence of sending an empty array as default text set to eslint.

preprocess: function (text, filename) {
    ...
    return []
  }

https://github.com/Twiknight/eslint-plugin-vue/blob/master/lib/processors/vueProcessor.js#L17

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions