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

JavaScript Standard Style on Travis CI #15

Closed
7 tasks done
joeljuca opened this issue Sep 10, 2017 · 6 comments
Closed
7 tasks done

JavaScript Standard Style on Travis CI #15

joeljuca opened this issue Sep 10, 2017 · 6 comments

Comments

@joeljuca
Copy link
Member

joeljuca commented Sep 10, 2017

We should configure Travis to run standard on our CI.

https://standardjs.com

--

Current list of failures:

  • standard ./bin/dsafio-config.js

    ./bin/dsafio-config.js:4:7: Parsing error: The keyword 'package' is reserved
    ./bin/dsafio-config.js:4:15: Multiple spaces found before '='.
    ./bin/dsafio-config.js:5:15: Multiple spaces found before '='.
    ./bin/dsafio-config.js:36:10: Extra semicolon.
    ./bin/dsafio-config.js:54:10: Extra semicolon.
    
  • standard ./bin/dsafio.js

    ./bin/dsafio.js:4:7: Parsing error: The keyword 'package' is reserved
    ./bin/dsafio.js:4:15: Multiple spaces found before '='.
    
  • standard ./lib/config.js

  • standard ./lib/fs-as-promise.js

    ./lib/fs-as-promise.js:1:12: Multiple spaces found before '='.
    
  • standard ./lib/registry.js

    ./lib/registry.js:1:15: Multiple spaces found before '='.
    ./lib/registry.js:2:7: 'path' is defined but never used.
    ./lib/registry.js:2:15: Multiple spaces found before '='.
    ./lib/registry.js:3:7: 'util' is defined but never used.
    ./lib/registry.js:3:15: Multiple spaces found before '='.
    ./lib/registry.js:5:15: Multiple spaces found before '='.
    
  • standard ./test/lib/config.test.js

    ./test/lib/config.test.js:1:14: Multiple spaces found before '='.
    ./test/lib/config.test.js:2:14: Multiple spaces found before '='.
    ./test/lib/config.test.js:4:14: Multiple spaces found before '='.
    ./test/lib/config.test.js:9:1: 'describe' is not defined.
    ./test/lib/config.test.js:9:36: Block must not be padded by blank lines.
    ./test/lib/config.test.js:11:3: 'it' is not defined.
    ./test/lib/config.test.js:13:3: 'describe' is not defined.
    ./test/lib/config.test.js:13:33: Block must not be padded by blank lines.
    ./test/lib/config.test.js:15:5: 'beforeEach' is not defined.
    ./test/lib/config.test.js:19:5: 'afterEach' is not defined.
    ./test/lib/config.test.js:21:5: 'it' is not defined.
    ./test/lib/config.test.js:23:5: 'it' is not defined.
    ./test/lib/config.test.js:30:5: 'it' is not defined.
    ./test/lib/config.test.js:36:5: 'it' is not defined.
    ./test/lib/config.test.js:52:3: Block must not be padded by blank lines.
    ./test/lib/config.test.js:54:3: 'describe' is not defined.
    ./test/lib/config.test.js:54:33: Block must not be padded by blank lines.
    ./test/lib/config.test.js:56:5: 'beforeEach' is not defined.
    ./test/lib/config.test.js:60:5: 'afterEach' is not defined.
    ./test/lib/config.test.js:65:5: 'it' is not defined.
    ./test/lib/config.test.js:67:5: 'it' is not defined.
    ./test/lib/config.test.js:71:5: 'it' is not defined.
    ./test/lib/config.test.js:75:5: 'it' is not defined.
    ./test/lib/config.test.js:81:5: 'it' is not defined.
    ./test/lib/config.test.js:89:3: Block must not be padded by blank lines.
    ./test/lib/config.test.js:91:1: Block must not be padded by blank lines.
    
  • standard ./test/lib/registry.test.js

    ./test/lib/registry.test.js:1:16: Multiple spaces found before '='.
    ./test/lib/registry.test.js:2:16: Multiple spaces found before '='.
    ./test/lib/registry.test.js:3:16: Multiple spaces found before '='.
    ./test/lib/registry.test.js:8:1: 'describe' is not defined.
    ./test/lib/registry.test.js:8:38: Block must not be padded by blank lines.
    ./test/lib/registry.test.js:10:3: 'it' is not defined.
    ./test/lib/registry.test.js:12:3: 'describe' is not defined.
    ./test/lib/registry.test.js:12:33: Block must not be padded by blank lines.
    ./test/lib/registry.test.js:14:5: 'beforeEach' is not defined.
    ./test/lib/registry.test.js:21:5: 'afterEach' is not defined.
    ./test/lib/registry.test.js:26:5: 'it' is not defined.
    ./test/lib/registry.test.js:28:5: 'it' is not defined.
    ./test/lib/registry.test.js:35:5: 'it' is not defined.
    ./test/lib/registry.test.js:41:5: 'it' is not defined.
    ./test/lib/registry.test.js:55:3: Block must not be padded by blank lines.
    ./test/lib/registry.test.js:57:1: Block must not be padded by blank lines.
    
@geymed
Copy link
Contributor

geymed commented Oct 1, 2017

@joelwallis I can take this.

@joeljuca
Copy link
Member Author

joeljuca commented Oct 1, 2017

Hey, @geymed!

Good to see you willing to contribute. 🙂 This task is a good one for one looking to jump on the project. Basically, you will need to:

  • add standard as dev dependency
  • make Travis run standard on all JavaScript files before all tests (this way we can fail fast if there are issues regarding style)
  • fix all warnings and errors that will be thrown by standard after configuring it

If you get in trouble, just raise a hand here in the comments section. 😊 Happy hacking!

@geymed
Copy link
Contributor

geymed commented Oct 1, 2017

@joelwallis thanks!
Regarding standard, do you want to run it both on test and library files?

@joeljuca
Copy link
Member Author

joeljuca commented Oct 1, 2017

Yep! CLI, libs and tests.

@joeljuca
Copy link
Member Author

joeljuca commented Oct 1, 2017

All JavaScript files must conform to standard.

@geymed
Copy link
Contributor

geymed commented Oct 1, 2017

@joelwallis I've submitted a PR: #26

joeljuca pushed a commit that referenced this issue Oct 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants