UNPKG

canonical

Version:

Canonical code style linter and formatter for JavaScript, SCSS, CSS and JSON.

23 lines (16 loc) 1.8 kB
# 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](https://github.com/eslint/eslint/tree/master/lib/formatters) 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) `-v`,`--verbose` | Verbose output (fully formatted output) `-V`,`--version` | Outputs the version number of Sass Lint