X Tutup
The Wayback Machine - https://web.archive.org/web/20201218223343/https://github.com/expressjs/session/pull/324
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

WIP: changes to standardjs code style #324

Open
wants to merge 1 commit into
base: master
from

Conversation

@gabeio
Copy link
Member

@gabeio gabeio commented Jun 15, 2016

There are still a few(actually a lot of the same) errors on the standard that I'm not understanding how to fix (90% are the test/session.js).

here's just a few:

  • session/index.js:87:7: 'options' is already defined
  • session/index.js:162:59: Unexpected use of comma operator.
  • session/session/store.js:30:1: The '__proto__' property is deprecated.
  • session/test/session.js:17:1: 'describe' is not defined.
  • session/test/session.js:18:3: 'it' is not defined.
  • session/test/session.js:27:20: Expected consistent spacing
  • session/index.js:447: Unexpected mix of '||' and '&&' no-mixed-operators
  • session/test/session.js:2350: Unnecessary escape character: \. no-useless-escape
@gabeio gabeio force-pushed the gabeio:standardjs branch 2 times, most recently from c4673bc to cbf7112 Jun 15, 2016
@gabeio gabeio added the pr label Jun 15, 2016
@dougwilson
Copy link
Member

@dougwilson dougwilson commented Jun 15, 2016

We probably want to merge as many PRs before doing this to this module, otherwise it is going to make it almost impossible to accept any of the current PRs (especially since this module was not using a format even close to standard before). Perhaps part of the 1 -> 2 version of this module? Thoughts?

As for some of the errors, they should be OK if you want to use the template I linked to in the standard issue (the changes do not really load on my phone well, so not sure).

@gabeio
Copy link
Member Author

@gabeio gabeio commented Jun 16, 2016

Oh that's true we should accepted the pull requests before merging this. I'll update it when we start to push towards v2.

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Jun 16, 2016

Hey @gabeio, if you rebase on top of 16cbfb2 then the __proto__ stuff should be gone now :)

@gabeio gabeio force-pushed the gabeio:standardjs branch from cbf7112 to 536f4d7 Jun 17, 2016
@gabeio
Copy link
Member Author

@gabeio gabeio commented Jun 17, 2016

Done 😄 yes the __proto__ error is gone 👍

@gabeio gabeio force-pushed the gabeio:standardjs branch from 536f4d7 to a9610c1 Jun 20, 2016
@@ -1,51 +1,53 @@
/* global describe, it, before */

This comment has been minimized.

@dougwilson

dougwilson Jun 20, 2016
Member

Rather than this, why not use the proposed pattern at expressjs/discussions#18 (comment) ? If you don't like the proposed pattern, please speak up in that discussion thread :)!

This comment has been minimized.

@gabeio

gabeio Jun 20, 2016
Author Member

oh that's fine I just was trying to figure out how to get rid of the standard error (I hadn't realized that explained/showed how to fix that issue!).

@gabeio gabeio force-pushed the gabeio:standardjs branch from 4be041a to f4f2a6b Jun 20, 2016
@gabeio
Copy link
Member Author

@gabeio gabeio commented Jun 20, 2016

@dougwilson should I make the changes, just like you made in that commit to this repository also; the package.json & .travis.yml edits that force it to run checks using the eslint?

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Jun 21, 2016

Yep :)

@gabeio
Copy link
Member Author

@gabeio gabeio commented Jun 22, 2016

done 👍 (three of the tests I had to add an if (err) return done(err))

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Jun 24, 2016

Nice! Doing a rebase should now resolve the second item on the list.

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Jun 24, 2016

And now item 1 should be resolved as well.

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Jun 24, 2016

I also just cherry-picked out your commit gabeio@a893cb3 since that is useful outside of just converting to Standard format.

@gabeio gabeio force-pushed the gabeio:standardjs branch 3 times, most recently from 62b854c to 2301ff1 Jun 24, 2016
@gabeio
Copy link
Member Author

@gabeio gabeio commented Jun 24, 2016

I rebased and squashed them. (without the commit you cherry-picked 👍 )


I'll continue to rebase as the master updates 👍 .

@gabeio gabeio force-pushed the gabeio:standardjs branch from 2301ff1 to 7c8a8bc Jun 28, 2016
@gabeio gabeio force-pushed the gabeio:standardjs branch from 7c8a8bc to e7c60a7 Aug 22, 2016
@gabeio gabeio force-pushed the gabeio:standardjs branch 3 times, most recently from 58a0612 to 26c4792 Aug 30, 2016
@gabeio gabeio added this to the 2.0.0 milestone Sep 13, 2016
@gabeio gabeio force-pushed the gabeio:standardjs branch from 26c4792 to 35c7795 Nov 28, 2016
@gabeio gabeio force-pushed the gabeio:standardjs branch from 35c7795 to c064f20 Jan 4, 2017
@gabeio
Copy link
Member Author

@gabeio gabeio commented Mar 16, 2017

feel free to add the [needs rebase] tag back to this pr as needed.

@gabeio gabeio changed the title WIP: changes to standard code style WIP: changes to standardjs code style Mar 16, 2017
@gabeio gabeio force-pushed the gabeio:standardjs branch from 69ab625 to 0278502 Mar 21, 2017
@gabeio gabeio force-pushed the gabeio:standardjs branch 3 times, most recently from a4c00e6 to d4313f7 Sep 9, 2017
@gabeio
Copy link
Member Author

@gabeio gabeio commented Sep 9, 2017

@dougwilson there are some new errors/suggestions in the standardjs lint:

/home/travis/build/expressjs/session/index.js
  284:15  error  'new Buffer()' was deprecated since v6. Use 'Buffer.alloc()' or 'Buffer.from()' (use 'https://www.npmjs.com/package/safe-buffer' for '<4.5.0') instead  node/no-deprecated-api
  447:27  error  Unexpected mix of '||' and '&&'  no-mixed-operators
  447:65  error  Unexpected mix of '||' and '&&'  no-mixed-operators
/home/travis/build/expressjs/session/test/session.js
  2350:31  error  Unnecessary escape character: \.  no-useless-escape
  2350:37  error  Unnecessary escape character: \.  no-useless-escape
@dougwilson
Copy link
Member

@dougwilson dougwilson commented Sep 9, 2017

I think I have a stash somewhere with the Buffer change, but not the others.

@gabeio
Copy link
Member Author

@gabeio gabeio commented Sep 9, 2017

The unnecessary escape character seems possibly incorrect.

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Sep 9, 2017

If the . character is within a character class [ ] then it doesn't need to be escaped, which is probably what the issue is.

@gabeio gabeio force-pushed the gabeio:standardjs branch 2 times, most recently from adffa6a to 526fb2b Oct 6, 2017
@dougwilson dougwilson force-pushed the gabeio:standardjs branch from 526fb2b to f4ed5a5 Mar 14, 2018
@dougwilson dougwilson force-pushed the gabeio:standardjs branch 4 times, most recently from f647f77 to c6af605 Mar 14, 2018
@dougwilson dougwilson force-pushed the gabeio:standardjs branch from c6af605 to ff23dc7 Apr 5, 2019
@dougwilson dougwilson force-pushed the gabeio:standardjs branch 2 times, most recently from 5c33972 to 73faa4e Oct 10, 2019
@dougwilson dougwilson force-pushed the gabeio:standardjs branch from 73faa4e to 6903b55 Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.
X Tutup