• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

linter-stylus

Lint `styl` on the fly, using stylus
olmokramer
0.2.0 22,056
3
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

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

  • Relative imports don't work when the import is in a directory from Stylus' paths option

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by