This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

JSHint

JSHint is a little neat linting tool for JavaScript that helps us keep our code neat and tidy. Please run JSHint before pushing changes.

1. Quick install guide

1.1. Fedora specific

$ pkcon install npm

1.2. Ubuntu specific

$ sudo apt-get install npm nodejs-legacy

1.3. General

Add ~/.local/bin/ to the path if it isn't already

$ echo "export PATH=$HOME/.local/bin:\$PATH" >> ~/.bashrc

Set up node.js to use ~/.local/

$ echo "prefix = ${HOME}/.local" >> ~/.npmrc
$ echo "export NODE_PATH=$HOME/.local/lib/node_modules/:\$NODE_PATH" >> ~/.bashrc
$ source ~/.bashrc

Install jshint

$ npm install -g jshint

2. Running JSHint

$ cd /path/to/gnome-maps/
$ jshint src/*.js

2024-10-23 10:58