Skip to content

no-code-outside-tag #2209

Open
Open
@tjx666

Description

@tjx666

Please describe what the rule should do:

help user find the code which will not work as expected

What category should the rule belong to?

  • Enforces code style (layout)
  • Warns about a potential error (problem)
  • Suggests an alternate way of doing something (suggestion)
  • Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<template>
  <div>666</div>
</template>

console.log(1);

<script>
console.log(2);
</script>

Additional context

the statement console.log(1); outside the tag will be ignored by vue compiler, and not work as expected

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions