eslint-plugin-svelte3
eslint-plugin-svelte3 copied to clipboard
newline breaks added by get_translation trigger no-multiple-empty-lines errors when maxBOF=1
no-multiple-empty-lines errors will be triggered when maxBOF is set to 1 (either explicitly or when falling back on max value, as it is the case by default for any config that extends eslint-config-standard)
The error can be silenced by setting maxBOF to 0 (?!?) or 2 (as I discovered while reading the config file posted by @lagden in #67)
Steps to reproduce: see https://github.com/maxlath/eslint-plugin-svelte3-no-multiple-empty-lines-bug-demo
From what I got, this seems to be due to the fact that eslint-plugin-svelte3 get_translation function adds \n before and after the transformed_code
In my Svelte projects I'm using this config for the time being:
"no-multiple-empty-lines": [
"error",
{
"max": 1,
"maxBOF": 2,
"maxEOF": 1
}
],
But yeah I think the parser should be updated so that the correct values are passed to ESLint