You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the standard rules I see that files must end with a newline. However when running standard it tells me files that adhere to this rule are wrong.
myFile.js -
function hello () {
console.log('hello')
}
module.exports = hello
$ standard --version
10.0.3
$ standard myFile.js
standard: Use JavaScript Standard Style (https://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.
/path/to/myFile.js:6:1: Too many blank lines at the end of file. Max of 0 allowed.
Searching the issues here I see this comment about enforcing no more than 1 newline at the end of a file.
Eslint's rules imply that this is wrong and we should use maxEOF: 1.
Maybe eslint fixed the wonkiness mentioned in the issue comment above?
The text was updated successfully, but these errors were encountered:
It seems like your file ends with two newlines? (one blank line)
The rule comes from the fact that a unix text file is defined as multiple strings all terminated by \n (a newline). It seems like your file ends with two newlines (\n\n) which is the same as one blank line.
Basically, there should be exactly one newline character at the end of the file, which will result in no blank lines at the end of the file.
From the standard rules I see that files must end with a newline. However when running standard it tells me files that adhere to this rule are wrong.
myFile.js -
Searching the issues here I see this comment about enforcing no more than 1 newline at the end of a file.
Eslint's rules imply that this is wrong and we should use
maxEOF: 1
.Maybe eslint fixed the wonkiness mentioned in the issue comment above?
The text was updated successfully, but these errors were encountered: