Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Missing space before function parentheses ? #1077

Closed
koolay opened this issue Dec 18, 2016 · 11 comments
Closed

fix: Missing space before function parentheses ? #1077

koolay opened this issue Dec 18, 2016 · 11 comments

Comments

@koolay
Copy link

koolay commented Dec 18, 2016

Eslint standard required:

Missing space before function parentheses

beautify result:

    export default {
        data() {
            return {
                input: ''
            }
        }
    }

expected:

    export default {
        data () { // this row
            return {
                input: ''
            }
        }
    }

@bitwiseman
Copy link
Member

bitwiseman commented Dec 22, 2016

This would be a difference for the rest of the function declarations.
Function declarations usually look like function bar() {} not function bar () {}.

@koolay
Copy link
Author

koolay commented Dec 26, 2016

has fixed ?

@bitwiseman
Copy link
Member

No. This is an enhancement that would require an additional setting. I encourage you to submit a pull request with tests.

@cody1991
Copy link

cody1991 commented Jan 7, 2017

using vue-cli eslint and also has this error:

Missing space before function parentheses

function bar() {} not function bar () {}.

I can just change

function bar()

to

let bar = () => {}

waiting for fix this ~

@budapeisidajiudian
Copy link

A function inside an object like this:

var myObj = {
    foo () {
        // something
    }
}

I can't use the arrow function
waiting for fix this or giving an option

@jernejrostan
Copy link

Anything new with this?

@bahatron
Copy link

it would definetly be nice to have this implemented

@tahaerden
Copy link

Having the same issue as I use js-standard formatting.
Linter package I use: https://github.com/ricardofbarros/linter-js-standard
Actual error: Missing space before function parantheses. (space-before-function-paren)

@121595113
Copy link
Contributor

I think I have to solve this problem, but I request to merge the code fails, who can help me #1436

@bitwiseman
Copy link
Member

There is now a space_after_named_function setting (see #608).

However, in the statement a = { myfunc() {} };, "myfunc" isn't recognized as a function expression.

@bitwiseman bitwiseman added this to the v1.8.9 milestone Dec 7, 2018
@bitwiseman
Copy link
Member

Fixed in #1425.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants