Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

fix(eslint): Make space-before-function-paren rule consistent with other rules #1858

Merged
merged 1 commit into from
Sep 6, 2017

Conversation

simison
Copy link
Member

@simison simison commented Aug 27, 2017

Fixes eslint errors in eslint 4.x:

Linter] Error running ESLint Error: /mean/.eslintrc.js:
	Configuration for rule "space-before-function-paren" is invalid:
	Severity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed "error").

We're still in eslint 2.x. so apparently no problems as of yet, but will have to be fixed before updating eslint (#1846).

Related to previous PR #1844 and already closed issue #1605

Fixes eslint errors in eslint 4.x:
```
Linter] Error running ESLint Error: /mean/.eslintrc.js:
	Configuration for rule "space-before-function-paren" is invalid:
	Severity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed "error").
```
@simison simison self-assigned this Aug 27, 2017
@simison simison requested a review from mleanos August 27, 2017 15:38
@simison
Copy link
Member Author

simison commented Aug 27, 2017

Hmm, actually now that I double checked docs, it was correct: https://eslint.org/docs/rules/space-before-function-paren

Something else is going on here. So I'm experiencing this with Atom editor and I assumed it's using locally installed eslint config of the project, but that might not be the case.

I started seeing shortly after updagint to eslint 4.x. in my project, but I just realised I also updated Atom.

After changing error to 2, I'm now seeing this in my Atom:

[Linter] Error running ESLint Error: /mean/.eslintrc.js:
	Configuration for rule "space-before-function-paren" is invalid:
	Value "[object Object]" no (or more than one) schemas match.

@simison simison changed the title fix(eslint): Fix space-before-function-paren rule [WIP] fix(eslint): Fix space-before-function-paren rule Aug 27, 2017
@mleanos
Copy link
Member

mleanos commented Sep 3, 2017

Any update here? I think I've noticed that when upgrading ESLint as well. So I doubt it's an issue with Atom.

@simison
Copy link
Member Author

simison commented Sep 5, 2017

@mleanos I had to update Atom, which somehow was stuck with updating itself, so I had to remove it and re-install. Now it works how ever the rule is.

Now it works fine, but I would still change that error to 2 just for consistency with other rules, or change everything else to string codes as well (they seem to use only strings now at eslint docs).

@simison simison changed the title [WIP] fix(eslint): Fix space-before-function-paren rule fix(eslint): Make space-before-function-paren rule consistent with other rules Sep 5, 2017
@mleanos
Copy link
Member

mleanos commented Sep 5, 2017

Ok. Let's just stick with using 2 for now. Then in a separate PR, we can update the settings to use the String parameter.

Copy link
Member

@mleanos mleanos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested locally, and it seems to work with the version of ESLint (3.19.0) that eslint-config-airbnb uses.

@simison simison removed the issue:bug label Sep 6, 2017
@simison simison merged commit 2c05600 into master Sep 6, 2017
@simison simison deleted the fix-eslint-error branch September 6, 2017 13:08
cicorias pushed a commit to JavaScriptExpert/mean that referenced this pull request Sep 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants