Giter Site home page Giter Site logo

Comments (7)

mdevils avatar mdevils commented on September 25, 2024

Can you please explain, what exactly problem is?

from node-jscs.

bdougherty avatar bdougherty commented on September 25, 2024

The problem is that there isn't a space before the round brace, it's a space before the curly brace, which should be allowed by that rule. I'm running into this issue as well.

from node-jscs.

hnrch02 avatar hnrch02 commented on September 25, 2024

IT'S BRAD! Sorry, I just couldn't contain myself 😄 Anyhow, I'm also experiencing this problem. 👍

from node-jscs.

tivac avatar tivac commented on September 25, 2024

Also just ran into this :feelsgood:

from node-jscs.

BryanDonovan avatar BryanDonovan commented on September 25, 2024

This should be reopened.. it's the one thing preventing me from using node-jscs I think.

from node-jscs.

BryanDonovan avatar BryanDonovan commented on September 25, 2024

I've added failing unit tests for this in this fork: https://github.com/BryanDonovan/node-jscs/compare/getter-setter-parens

.. but I haven't figured out a solution yet.

from node-jscs.

BryanDonovan avatar BryanDonovan commented on September 25, 2024

I've narrowed it down a bit.

This passes:

it('should not report missing space before round brace in getters w/o space inside curly braces', function() {
    checker.configure({ disallowSpacesInFunctionExpression: { beforeOpeningRoundBrace: true } });
    assert(checker.checkString('var x = { get foo() {} }').isEmpty());
});

But this fails:

it('should not report missing space before round brace in getters with space inside curly braces', function() {
    checker.configure({ disallowSpacesInFunctionExpression: { beforeOpeningRoundBrace: true } });
    assert(checker.checkString('var x = { get foo() { } }').isEmpty());
});

The error message points to the space after the closing round brace, before the opening curly brace.

from node-jscs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.