4

I get this Stylelint error suddenly in two of my components, I don't know why.

Unexpected empty source (no-empty-source)

I created a third component and removed content to the point where there is no content left, and the error still shows for that component too. So what can the issue be? I tried to understand this eslint documentation page , but I don't understand much of it, it does not explain what a "source" is.

Here is the simplified component (which is not used in the project):

<template>
  <p>ok</p>
</template>

<script lang="ts">
import { Component, Vue } from 'nuxt-property-decorator';
@Component
export default class NewComponent extends Vue {}
</script>

<style lang="postcss" scoped></style>

I get:

components/common/NewComponent.vue
 12:31  ×  Unexpected empty source   no-empty-source
kissu
  • 40,416
  • 14
  • 65
  • 133
Galivan
  • 4,842
  • 9
  • 44
  • 76

1 Answers1

3

The issue was happening because there was an empty style tag, removing it fixed the issue.

kissu
  • 40,416
  • 14
  • 65
  • 133