Linter for Squirrel with support for Electric Imp platform.
Utilizes standard Squirrel compiler binary – sq.
brew install squirrel
apm install language-squirrel linter squirrel-linter
In order for plugin to work, sq executable should be available.
OS X
brew install squirrel
Linux, Windows
http://sourceforge.net/projects/squirrel/
$ apm install squirrel-linter
Alternatively, package can be installed from the Settings pane of Atom by searching for and installing the squirrel-linter
package.
You need linter and language-squirrel packages installed as well. If you don't have them, run:
$ apm install linter language-squirrel
or install them via the Settings pane.
After installation, you will see error highlighted in the editor and the output in the console. (To view the console, press Cmd+Alt+I on OS X, or Ctrl+Alt+I on Windows.)
In order to be able to run the Electric Imp code, shims are automatically added to the source:
- server.log(var)
- imp.wakeup(timeout, callback)
- imp.cancelwakeup(timeout_id)
- _(var) – converts a variable to JSON
- __(var) – prints a variable as JSON
[default: "sq"]
Electric Imp uses non-standard Squirrel compiler, so to replicate EI environment this config option can be set to use the specific compiler binary.
[default: true]
If this option is set to true, compiler output and other debug information will be displayed in developer tools console. To show the console press Ctrl+Cmd+I OS X, or Ctrl+Alt+I on Windows.
[default: true]
If this option is set to true, EI shims will be included and file will be executed, rather than just compiled. The output will appear in devtools console.
- Uses the standard squirrel distribution, easily obtainable with Homebrew on OS X
- Allows code execution to catch runtime errors
- Adds EI-specific shims to the code
MIT
Mikhail Yurasov me@yurasov.me