Skip to content

Latest commit

 

History

History
 
 

cli

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Command Line Interface

Sass Lint can be run via its Command Line Interface (CLI). To do so, run sass-lint from the command line.

By default, the command will run against the glob defined by a user's file.include option in their config, or a glob (or single file) can be passed as the last argument to the CLI to be explicitly run against.

Please note that when using glob patterns such as folder/**/*.scss as a command line argument (files to be linted or ignored) you will need to wrap the pattern in quotes or escape the * characters to prevent bash/zsh from automatically expanding the glob pattern.

Options

The following options are available for the CLI:

Command Line Flag Description
-c,--config [path] Path to the config file that should be used, relative to the directory the the command is being run in (will override other config path options)
-f,--format [format] Pass one of the available Eslint formats to format the output of sass-lint results.
-h,--help Outputs usage information for the CLI
-i,--ignore [pattern] A pattern that should be ignored from linting. Multiple patterns can be used by separating each pattern by , . Patterns should be wrapped in quotes (will be merged with other ignore options)
-o,--output [output] The path plus file name relative to where Sass Lint is being run from where the output should be written to.
-q,--no-exit Prevents the CLI from throwing an error if there is one (useful for development work)
-s,--syntax Syntax to evaluate the given file(s) with, either sass or scss. Use with care: overrides filename extension-based syntax detection.
-v,--verbose Verbose output (fully formatted output)
-V,--version Outputs the version number of Sass Lint