JsValidate
Validate the syntax of any JavaScript file in Sublime Text using Esprima
Details
Installs
- Total 12K
- Win 7K
- Mac 4K
- Linux 2K
Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | Jul 31 | Jul 30 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 1 | 0 | 2 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
Readme
- Source
- raw.githubusercontent.com
JsValidate for Sublime Text
Check your JavaScript for syntax errors: Esprima with everyone's favorite text editor: Sublime Text
Prerequisites: EsValidate and Sublime Package Control
Mac OS X: Installing node with homebrew or macports is assumed. The path to esvalidate 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 esvalidate is in your environment path.
Windows: Installing node with the Windows Installer from nodejs.org is assumed.
Install esvalidate with npm
npm install -g esvalidate
Install JsValidate with Package Control in Sublime Text
command
-shift
-P
orcontrol
-shift
-P
in Linux/Windows*- type
install p
, selectPackage Control: Install Package
- type
JsValidate
, selectJsValidate
Note: Without Sublime Package Control, you could manually copy this project to your Packages directory as 'JsValidate'.
Run JsValidate on an active JavaScript file in Sublime Text
control
-shift
-V
or Tools/Contextual menus or the Command PaletteF4
jump to next error row/columnshift
-F4
jump to previous error row-column
Settings
- Navigate to Preferences > Package Settings > JsValidate > Settings - Default.
- To preserve custom settings:
- copy default settings to Preferences > Package Settings > JsValidate > Settings - User
- modify them to your requirements
Run JsValidate on save
By default, JsValidate does not run on save. To change, simply change the setting run_on_save
for the project to true
.
Error: unknown report format sublime.
Seeing this error means you are using an outdated version of EsValidate. Update to the latest version and this error should go away.
Blog Posts
I wrote some blog posts about creating this plugin and the esvalidate library here.