Skip to content

Build: Update grunt-jscs #330

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

Closed
wants to merge 2 commits into from
Closed

Conversation

gibson042
Copy link
Member


// Add totals to table
i = firstTestedColumn();
while ( (elem = tds[ i++ ]) ) {
attr = elem.getAttribute("data-engine");
while ( ( elem = tds[ i++ ] ) ) {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm really not happy with introducing such whitespace into parenthesized expressions (as opposed to parameter/argument lists). Can anything be done about this?

Copy link
Member

Choose a reason for hiding this comment

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

I agree with you, but I think the point is that we need consistency and the easiest way to get that now is by making the rules as simple as possible for jscs to enforce.

Copy link
Member

Choose a reason for hiding this comment

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

Well, if you remember, we three were outvoted on this matter, for me this very uncomfortable too :-(

Copy link
Member

Choose a reason for hiding this comment

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

I think the lack of spaces in the inner parens actually makes it clearer that they are doing grouping, so I am not a fan of extra spaces either. So is this mainly about making a simple rule ("There must be spaces around parens, except the left paren of a function call")?

Copy link
Member Author

Choose a reason for hiding this comment

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

The rule that I want would apply to parenthesized expressions specifically instead of only the broader class including function parameters and call expression arguments (all of which are wrapped in parentheses).

Copy link
Member

Choose a reason for hiding this comment

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

@gibson042 distinguishing grouping parentheses with other cases is pretty hard goal to accomplish :-(, otherwise i would did it a long time.

Nevertheless, you are very welcome to take a stab on it yourself

Copy link
Member Author

Choose a reason for hiding this comment

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

It should be easier after the San Francisco ESTree concrete syntax discussion. But if you can point me at the relevant code in JSCS, I'll happily take a look sooner.

Copy link
Member

Choose a reason for hiding this comment

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

It should be easier after the San Francisco ESTree concrete syntax discussion.

Not sure if there would be discussion about that :-(

But if you can point me at the relevant code in JSCS, I'll happily take a look sooner.

Parentheses rules - (require | disallow)SpacesInsideParentheses

Copy link
Member Author

Choose a reason for hiding this comment

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

@mgol
Copy link
Member

mgol commented May 23, 2016

This will need to land to make Sizzle buildable in Node 7 when it comes in 5 months as the current JSCS uses an old version of graceful-fs that will break there.

@timmywil
Copy link
Member

It will also need a rebase to resolve conflicts.

@markelog
Copy link
Member

old version of graceful-fs that will break there.

Where? Could you provide a link?

@mgol
Copy link
Member

mgol commented May 23, 2016

@markelog

$ node --version
v6.2.0
$ pm i graceful-fs@3
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

@markelog
Copy link
Member

no-no, i meant "uses" part, where is it declared as dependency?

@mgol
Copy link
Member

mgol commented May 24, 2016

Ah, OK. It's easy to check. :)

$ npm ls graceful-fs
sizzle@2.3.1-pre /Users/mgol/Documents/projects/public/jquery/sizzle
├─┬ grunt@0.4.5
│ └─┬ glob@3.1.21
│   └── graceful-fs@1.2.3 
├─┬ grunt-jscs@0.6.2
│ └─┬ jscs@1.5.9
│   └─┬ glob@4.0.6
│     └── graceful-fs@3.0.8 
├─┬ karma@0.13.22
│ ├─┬ chokidar@1.5.1
│ │ └─┬ fsevents@1.0.12
│ │   └─┬ node-pre-gyp@0.6.25
│ │     └─┬ tar@2.2.1
│ │       └─┬ fstream@1.0.8
│ │         └── graceful-fs@4.1.3 
│ └── graceful-fs@4.1.4 
└─┬ karma-browserstack-launcher@1.0.0
  └─┬ browserstacktunnel-wrapper@1.4.2
    └─┬ unzip@0.1.11
      └─┬ fstream@0.1.31
        └── graceful-fs@3.0.8 

Wersions <4.0.0 are affected.

@markelog
Copy link
Member

markelog commented May 24, 2016

it seems we just using old grunt-jscs here, in any case never mind though, we will switch to eslint soon. I think we need to land this ASAP.

So i could start working on moving to eslint. Also, this

This probably deserves its own commit

Is still stands, although i would just remove these changes, we need to update that list anyhow

mgol added a commit that referenced this pull request May 24, 2016
grunt & grunt-cli updates must wait for the grunt-jscs update that's being
prepared in #330.
@gibson042
Copy link
Member Author

I'm closing this. An ESLint replacement would be welcomed, which I can do later if no one else is interested.

@gibson042 gibson042 closed this May 24, 2016
@markelog
Copy link
Member

I would still merge it though, code style violations would be present either way, i was planing do the eslint migration too, right after core

@markelog
Copy link
Member

markelog commented Jun 11, 2016

Since you closed this pull despite my suggestion, i imagine you have your own plan how to do this without duplicating these efforts so i will leave you to it then

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

Successfully merging this pull request may close these issues.

6 participants