JSHint, Project structure, move with Git and Our path…


  1. JSHint
  2. Project structure.
  3. Move files with Git.
  4. Our path…


1. JSHint

We talked about the importance of using JSHint and @AirCrewMentor shared his usual .jshintsc configuration.

So at the root folder of every project the file .jshintsc must be created to establish the styling rules.

I was using the package installed on sublime JSHint for it but AirCrewMentor said that it is better to use the Bash line command, so we used npm to install jshint and after that we were able to use the command jshint lib/ or the desired folder to link.

Created the make lint at the makefile

jshint lib/

The importance to use the command, is because using an add-on in sublime is cool, but I need to get a good base on writing code on my own and if someday I go into an interview maybe I wont have sublime or my computer, but I would be able to use the bash.

2. Project Structure.

We talked a little bit about this in a previous session, but never got into it. This time AirCrewMentor wanted to start giving the proper structure to our code.

We can see the following typical structures:

  • app/ (or lib/ or src/) depending on if it’s an app or actually a library.
  • here goes all our files we are going to code ourselves.
  • Usually the main file is called index.js and if this is the case, it is automatically collected.
  • public/
  • Here we would put all our pictures, html, css, js(vendor) that we are going to need for our code to run.
  • dist/
  • Here is were we’ll put the final result of our JS code in a preferably single file (minified version)
  • test
  • our files for test
  • node_modules
  • libraries installed.
  • root
  • At this level we are going to have the following files:
  • .gitignore
  • .jshintrc
  • Gruntfile.js
  • Makefile
  • package.json
  • readme.md

3. Move files with Git.

Usually when a project is committed, we need to move and rename the files with git command, so it keeps the history of changes on the file. Otherwise it would appear like a file deleted and a new file without history.

$ git mv js/format_money.js lib/
# here we moved the file and renamed.
$ git mv js/main.js lib/index.js

4. Our path…

Now I need to choose a personal project were I can find motivation and dedication, because before starting something more serious I need to get experience coding with sublime and iTerm.

I need to choose a project that keeps me up at nights


  • Propose some projects that keep me up at nights
  • Finish the NodeJS course
  • Write the Wireframe for the tracking project AirCrewMentor proposed.
Thanks for your time @AirCrewMentor , I’m loving it.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s