Giter Site home page Giter Site logo

atom-squirrel-linter's Introduction

squirrel-linter

Linter for Squirrel with support for Electric Imp platform.

Utilizes standard Squirrel compiler binary – sq.

OS X TL;RD

brew install squirrel
apm install language-squirrel linter squirrel-linter

Plugin Installation

Squirrel Installation

In order for plugin to work, sq executable should be available.

OS X

brew install squirrel

Linux, Windows

http://sourceforge.net/projects/squirrel/

Atom Package

  • $ apm install squirrel-linter

Alternatively, package can be installed from the Settings pane of Atom by searching for and installing the squirrel-linter package.

Dependencies

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.

Usage

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.)

Electric Imp-specific Features

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)

Convenience Features

  • _(var) – converts a variable to JSON
  • __(var) – prints a variable as JSON

Configuration Options

squirrel-linter.execPath

[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.

squirrel-linter.verbose

[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.

squirrel-linter.run

[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.

How is this different from linter-squirrel

  • 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

License

MIT

Author

Mikhail Yurasov [email protected]

atom-squirrel-linter's People

Contributors

myurasov avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.