The API is finally up and running. Exciting. We are finally able to test both frontend and backend now.
Spent two hours setting up SublimeLinter. Run into a couple of problems.
The solutions are:
1. Make sure jshint is installed
npm install -g jshint
2. Inside SublimeLinter.sublime-settings. Make sure pointing javascript to the right node path
{ "sublimelinter": true, "javascript_linter": "jshint", "sublimelinter_executable_map": { "javascript": "/Users/shao/.nvm/v0.10.10/bin/node" }, "sublimelinter_mark_style": "fill", "sublimelinter_gutter_marks": true, "jshint_options": { "regexdash": true, "browser": true, "devel":true, "sub": true }, "sublimelinter_notes": true }
3. Patch the linter.js per this bug (this might no longer be necessary):
https://github.com/twolfson/SublimeLinter/commit/6ac7ae2845edb9ea1a27d046fb1da5b1bd1eac08
cd "/Users/shao/Library/Application Support/Sublime Text 2/Packages/SublimeLinter/sublimelinter/modules/libs/jshint/" // add two lines to the beginning of linter.js // Define window globally for node to prevent browserify errors global.window = {};
4.set the color of sublime linter
– Find the theme file. If you are using the default theme on Mac, then the file is located at: /Users/shao/Library/Application Support/Sublime Text 2/Packages/Color Scheme – Default/Monokai.tmTheme
– Copy and paste the highlighting color settings into the theme file. PLEASE put it INSIDE the
<array></array>
. In other words, please paste color settings just before
</array>
.
-This is the text used to find the target location to paste into
</array> <key>uuid</key> <string>D8D5E82E-3D5B-46B5-B38E-8C841C21347D</string> </dict> </plist>
-The highlighting color settings. This is the text to be copied into the target location
<dict> <key>name</key> <string>SublimeLinter Annotations</string> <key>scope</key> <string>sublimelinter.annotations</string> <key>settings</key> <dict> <key>background</key> <string>#FFFFAA</string> <key>foreground</key> <string>#FFFFFF</string> </dict> </dict> <dict> <key>name</key> <string>SublimeLinter Error Outline</string> <key>scope</key> <string>sublimelinter.outline.illegal</string> <key>settings</key> <dict> <key>background</key> <string>#FF4A52</string> <key>foreground</key> <string>#FFFFFF</string> </dict> </dict> <dict> <key>name</key> <string>SublimeLinter Error Underline</string> <key>scope</key> <string>sublimelinter.underline.illegal</string> <key>settings</key> <dict> <key>background</key> <string>#FF0000</string> </dict> </dict> <dict> <key>name</key> <string>SublimeLinter Warning Outline</string> <key>scope</key> <string>sublimelinter.outline.warning</string> <key>settings</key> <dict> <key>background</key> <string>#DF9400</string> <key>foreground</key> <string>#FFFFFF</string> </dict> </dict> <dict> <key>name</key> <string>SublimeLinter Warning Underline</string> <key>scope</key> <string>sublimelinter.underline.warning</string> <key>settings</key> <dict> <key>background</key> <string>#FF0000</string> </dict> </dict> <dict> <key>name</key> <string>SublimeLinter Violation Outline</string> <key>scope</key> <string>sublimelinter.outline.violation</string> <key>settings</key> <dict> <key>background</key> <string>#ffffff33</string> <key>foreground</key> <string>#FFFFFF</string> </dict> </dict> <dict> <key>name</key> <string>SublimeLinter Violation Underline</string> <key>scope</key> <string>sublimelinter.underline.violation</string> <key>settings</key> <dict> <key>background</key> <string>#FF0000</string> </dict> </dict>