Currently, the style.js enforces at most two lines:
// disallow multiple empty lines
'no-multiple-empty-lines': [2, {'max': 2}],
Should this follow this suggestion to enforce the max blank line to only 1?
Besides, this will affect the allowed blank line at the end of the file, too.
Close it. It has been enforced by this commit.
That change throws the following error:
Error: eslint-config-airbnb/rules/style: Configuration for rule "no-multiple-empty-lines" is invalid: Value "data["1"].maxEOF" has additional properties.
Here's the stack:
Error: eslint-config-airbnb/rules/style:
Configuration for rule "no-multiple-empty-lines" is invalid:
Value "data["1"].maxEOF" has additional properties.
Referenced from: eslint-config-airbnb/legacy
Referenced from: eslint-config-airbnb/base
Referenced from: airbnb
Referenced from: /Users/hornerjn/dev/ih-portal/.eslintrc
at validateRuleOptions (/Users/hornerjn/dev/ih-portal/node_modules/eslint/lib/config-validator.js:98:15)
at /Users/hornerjn/dev/ih-portal/node_modules/eslint/lib/config-validator.js:144:13
at Array.forEach (native)
at Object.validate (/Users/hornerjn/dev/ih-portal/node_modules/eslint/lib/config-validator.js:143:35)
at loadConfig (/Users/hornerjn/dev/ih-portal/node_modules/eslint/lib/config.js:179:19)
at /Users/hornerjn/dev/ih-portal/node_modules/eslint/lib/config.js:207:46
at Array.reduceRight (native)
at loadConfig (/Users/hornerjn/dev/ih-portal/node_modules/eslint/lib/config.js:191:36)
at /Users/hornerjn/dev/ih-portal/node_modules/eslint/lib/config.js:207:46
at Array.reduceRight (native)
When I change the rule back to 'no-multiple-empty-lines': [2, {'max': 2}], everything works fine.
@Ganonside Perhaps you don't have a new enough version of eslint? What happens if you npm install eslint@latest and then rerun the linter?
Actually, this is happening to me as well. 2 different project, 2 different machines.
Same
@Andreyco @Martindelataille what version of eslint are you using?
@ljharb Sorry. I am using eslint 1.10.3, eslint-config-airbnb 3.3.12, eslint-loader 1.1.0
@Martindelataille can you point me to a git repo that can reproduce your issue?
Just starting seeing this same error, haven't updated eslint or eslint-config-airbnb in a while so unclear why this would mysteriously start now.
"eslint": "^1.10.1",
"eslint-config-airbnb": "^1.0.0",
This issue is the only result in Google when searching for this error. Unfortunately repo is private.
I'm having the same problem, the error I am getting is:
Error: /path/to/project/node_modules/eslint-config-airbnb/rules/style.js: Configuration for rule "no-multiple-empty-lines" is invalid: Value "data["1"].maxEOF" has additional properties.
Versions:
"eslint": "^2.3.0",
"eslint-config-airbnb": "6.1.0",
I updated to latest and still have the same issue.
@paulintrognon: If I remember correctly, there was a problem with my editor using globally installed package versions that were very out-of-date. I believe nvm was also making the issue worse by obfuscating my global npm installs.
Once I removed all the old versions that were globally installed, both within nvm node-version-specific directories and outside, the issue went away.
Hope this helps.
@dsernst You're right! I had an outdated eslint version installed globally. I removed it and got rid of the error. Thank you very much!
Most helpful comment
@dsernst You're right! I had an outdated eslint version installed globally. I removed it and got rid of the error. Thank you very much!