linter-stylus

Lint `styl` on the fly, using stylus

olmokramer

22,155

3

0.2.0

MIT

GitHub

linter-stylus

This plugin for Linter provides an interface to stylus. It will be used with files that have the Stylus syntax.

Installation

Linter package must be installed in order to use this plugin. If Linter is not installed, please follow the instructions here.

Plugin installation

$ apm install linter-stylus

Stylus include paths

Stylus has a paths option, which is an array to look in for relative @imports. This option cannot be detected by linter-stylus, and it will throw errors that it can't find the @imports. To solve this, you can add a linter-stylus section to the project root's package.json to defines these include paths:

# package.json
{
  "name": "project-name",
  "version": "v1.0.0",
  "etc...": "",
  "linter-stylus": {
    "includePaths": [
      "/home/user/some/dir/with/stylus/includes",
      "/some/other/path"
    ]
  }
}

Now stylus will also look in those directories for an @import file when linting.

Settings

You can configure linter-stylus from the settings view in Atom, or by editint ~/.atom/config.cson:

'linter-stylus':
  # if you don't want to use the bundled version of stylus
  'stylusPath': '/usr/local/lib/node_modules/stylus'

Known issues