eol-last with whitespace breaks everything
See original GitHub issueTell us about your environment
- ESLint Version: 5.11.1
- Node Version: 10.11.0
- npm Version: 6.9.0
What parser (default, Babel-ESLint, etc.) are you using? default with VSCode plugin Please show your full configuration:
Configuration
{
"env": {
"es6": true,
"node": true,
"mocha": true
},
"extends": [
"eslint-config-standard",
"react-app"
],
"globals": {
"integrations": true
},
"ecmaFeatures": {
"jsx": true,
"node": true
},
"plugins": [
"react"
],
"rules": {
"no-use-before-define": 2,
"symbol-description": 0
}
}
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
const init = () => {
console.log('dsadsa')
const dsada = 1
}
What did you expect to happen? I expected it to show me all linter errors.
What actually happened? Please include the actual, raw output from ESLint. It only shows some unrelated linter errors. After removing whitespace from last line it shows all errors
Are you willing to submit a pull request to fix this bug? No
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
eol-last: Add "none" option to enforce no line break at end of file
What did you expect to happen? If the file ends in a single newline character, this should be a linting error. What actually...
Read more >eol-last - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >enforce consistent line breaks inside function parentheses ...
This rule has a single option, which can either be a string or an object. "always" requires line breaks inside all function parentheses....
Read more >html - Why does the browser renders a newline as space?
Browsers condense multiple whitespace characters (including newlines) to a single space when rendering. The only exception is within <pre> ...
Read more >Reduce smelling code and detect JavaScript issues with ESLint
Incorrectly placed spaces, non-standard line breaks, ... Not all Linters analyze source code for performance and security, but some do.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@platinumazure here is the stack trace from the output. As you can see the provided demo is only 5 lines but it keeps requesting line 6 when a whitespace is on line 5. It is a real nightmare trying to figure out why our linter is not working as intended with this issue.
I was hoping I or someone else would have a chance to try to recreate the bug before the issue got auto-closed (again). I apologize for not having had a chance to do it myself.
@eslint/eslint-team Could someone please try recreating this bug with the configuration and source code from the original post?