Sublime Forum

Learning linter

#1

Hi im a newbie to all this and need some help, ive downloaded sublime text 3 and have been looking around the installer, ive come across linter and im trying to download linter for css and hopefully html. ive downloaded nojs and linter into sublime and have the code for jshint but i cant open a terminal to put it into. ive looked every where and its not happening for me help please.

0 Likes

#2

Hi,
assuming you are talking about the SublimeLinter package, here is their documentation http://www.sublimelinter.com/en/stable/.
Anyway, linters packages are usualy just a frontend representation of the actual linter (which is usually external).

That said, again, assuming you are talking about SublimeLinter and SublimeLinter-csslint, the steps to make it work are:

  • install the actual linter engine by opening a terminal window (system terminal not sublime’s terminal) and typing in npm install -g csslint (you’ll need node.js and npm installed and running on your machine)

  • put csslint binary in $PATH so it will be available from within Sublime

  • install sublimeLinter and sublimeLinter-csslint packages

  • setup csslint rules (https://github.com/CSSLint/csslint/wiki/Rules) by editing sublimeLinter preferences (Preferences > Package Settings > SublimeLinter > Settings)

    for example here is my configuration:
    "csslint": { "disable": false, "args": [], "errors": "ids,display-property-grouping,duplicate-properties,empty-rules,errors,known-properties,vendor-prefix", "excludes": [], "ignore": "order-alphabetical", "warnings": "adjoining-classes,box-model,box-sizing,compatible-vendor,duplicate-background,fallback-colors,floats,font-faces,font-sizes,gradients,import,important,outline-none,overqualified-elements,qualified-headings,regex-selectors,rules-count,shorthand,star-property,text-indent,underscore-property,unique-headings,universal-selector,zero-units" }

  • have fun :slight_smile:

1 Like

#3

@davehappen. Hi, for the future maybe, if you’re having trouble with ST, you’re more likely to get a reply if you move the topic from General Discussion to Technical, as it seems like technical questions get the priority…

Good luck !

0 Likes