polygonplanet / sublime-text-eslint

ESLint any JavaScript file in Sublime Text
24 stars 7 forks source link

Support for something like baseIndent #27

Open GiovanH opened 3 years ago

GiovanH commented 3 years ago

When the sublime linter checks javascript inside <script> blocks (in html or vue files), it uses the global indent rules that assume the inner block should start at indent 0. This means that every line of a correctly formatted script block in the style

<script>
  function foo(bar) {
    doSomething(bar);
  }
</script>

will be incorrectly labeled as indent errors.

This should have been addressed by the eslint baseIndent option, but that was rejected (due to a policy change, rather than an issue with the change).