#JSHint for Sublime Text
The best JavaScript syntax checker: [JSHint](http://www.jshint.com/) for the best text editor: [Sublime Text](http://www.sublimetext.com/2)
![ScreenShot](https://raw.github.com/uipoet/sublime-jshint/preview/jshint.png)
**Prerequisites:** [jshint](https://github.com/jshint/jshint) and [Sublime Package Control](http://wbond.net/sublime_packages/package_control/installation)
**Mac OS X:** Installing node with homebrew or macports is assumed. The path to jshint is hardcoded in this plugin as `/usr/local/share/npm/bin:/usr/local/bin:/opt/local/bin`. There is no reliable way to get the path from your environment.
**Linux:** Make sure jshint is in your environment path.
**Windows:** Installing node with the Windows Installer from nodejs.org is assumed.
##1. Terminal
npm install -g jshint
**Note:** JSHint will use the first .jshintrc file found traversing from the active file in Sublime Text up to your project's root.
##2. Sublime Text Package Control
- `command`-`shift`-`p` *or* `control`-`shift`-`p` in Linux/Windows
- type `install p`, select `Package Control: Install Package`
- type `jshint`, select `JSHint`
**Note:** Without Sublime Package Control, you could manually clone to Packages directory as 'JSHint', exactly.
##3. JSHint an active JavaScript file
- `control`-`j` *or* `alt`-`j` in Linux/Windows *or* Tools/Contextual menus *or* the Command Palette
- `F4` jump to next error row/column
- `shift`-`F4` jump to previous error row-column
**Note:** The `control`-`j`/`alt`-`j` shortcut changes the Build System on the current file to JSHint, then Builds to run JSHint on the file and output any errors for jumping to within the file. You could alternatively set the Build System to Automatic and `command`-`b`/`control`-`b`/`F7`, but only on files that end with .js.
##JSHint on save
Install [SublimeOnSaveBuild](https://github.com/alexnj/SublimeOnSaveBuild)
sublime插件SublimeLinter之jshint
需积分: 10 42 浏览量
2016-08-04
01:54:44
上传
评论 1
收藏 5KB ZIP 举报
ml065787
- 粉丝: 3
- 资源: 24
最新资源
- 毕业设计- 基于STM32F103C8T6 单片机,物联网技术的太阳能发电装置+源代码+文档说明+架构图+界面截图
- 基于 LSTM(长短期记忆)(即改进的循环神经网络)预测风力发电厂中风力涡轮机产生的功率+源代码+文档说明
- 基于stm32f103+空心杯电机+oled按键+运动算法
- 《CKA/CKAD应试指南/从docker到kubernetes 完全攻略》学习笔记 第1章docker基础(1.1-1.4)
- 基于python实现的水下压缩空气储能互补系统建模仿真与经济效益分析+源代码+论文
- 华中科技大学-自然语言处理实验,Bi-LSTM+CRF的中文分词框架,并且利用基于深度学习的方法进行中文命名实体识别++源码报告
- 基于动态罚函数的铁路车流分配与径路优化模型python源码
- 鱼群算法求解组环问题python源码+文档说明
- 基于决策优化的多波束测深测线规划模型MATLAB代码
- 课程设计-基于python实现的多目标优化算法求解带时间窗的车辆路径规划问题+源代码+文档说明+界面截图+pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈