Sider Documentation

Sider Documentation

›Analysis Tools

Getting Started

  • Home
  • Setting up Sider
  • Repository Settings
  • Custom Analysis Configuration
  • Working with Issues
  • Permissions

Analysis Tools

    Ruby

    • RuboCop
    • Reek
    • Querly
    • Rails Best Practices
    • Brakeman
    • HAML-Lint

    Java

    • Checkstyle
    • PMD

    JavaScript and Flavors

    • ESLint
    • JSHint
    • TSLint
    • CoffeeLint

    PHP

    • Phinder
    • PHPMD
    • PHP_CodeSniffer

    Python

    • Flake8

    Swift

    • SwiftLint

    CSS

    • stylelint
    • SCSS-Lint

    Go

    • go vet
    • Golint
    • Go Meta Linter

    Others

    • Goodcheck
    • Misspell

Advanced Settings

  • Inline Comments
  • Private Dependencies
  • Restricting access to Close button

Billing and Plans

  • Billing and Plans

Troubleshooting

  • Troubleshooting

Enterprise

  • Computer Resources
  • Quick Start

    • Setup Guide
    • Update Guide

    Testing

    • Testing for Sider running

    Releases

    • Release Notes
Edit

stylelint

Supported VersionLanguageWeb Site
Optional (default to 9.10.1)CSS / Any languages that PostCSS can parse
(e.g. SCSS, SugarSS and Less)
https://stylelint.io/

Getting Started

To start using stylelint, enable it in Repository Settings and declare it as a dependency in your package.json:

$ npm install stylelint -D

Sider supports styelint plugins and configurations that are provided as npm packages.

If you need more customization, use the standard stylelint config files. For example, use .stylelintrc.yaml to customize rules, and .stylelintignore to ignore files and directories.

Default Configuration

If you don't have any custom configuration defined, Sider uses the latest version of stylelit-config-recommended.

Configuration via sideci.yml

Here are example settings for stylelint under stylelint:

linter:
  stylelint:
    npm_install: true
    config: lint_yml/mystylelintrc.yaml
    ignore-path: .gitignore
    syntax: sugarss
    ignore-disables: true
    report-needless-disables: true
    quiet: true
    glob: '**/*.{css,scss}'

Options

You can use several options to fine-tune stylelint to your project.

NameTypeDescription
npm_installboolean,
string
Run npm install before analysis.
configstringSet the configuration file for stylelint.
syntaxstringSet a non-standard syntax for PostCSS.
ignore-pathstringSet the path to the ignore file.
ignore-disablesbooleanIf true, stylelint will ignore all stylelint-disable comments.
report-needless-disablesbooleanIf true, stylelint-disable comments will be reported.
quietbooleanIf true, rules less severe than 'error' will be ignored.
globstringSpecify the file extensions inspected by stylelint.

npm_install

This option allows you to use npm install to install dependencies before analysis starts.

ValueExecution Command
truenpm install --ignore-scripts
falseNone.
developmentnpm install --only=development --ignore-scripts
productionnpm install --only=production --ignore-scripts
Other valuesSider analysis fails.

Note that if your package.json contains dependecies which cannot be installed in the Sider container, npm install will fail. In this case, try using the development or production option. You can also make the failing dependency an optionalDependency.

config

This option allows you to specify a configuration file for stylelint. If you have your own settings file for stylelint, use this option. The valid extensions for stylelintrc are .yml, .yaml, .json and .js. You can also use .stylelintc and package.json for configuration.

syntax

This option allows you to control the non-standard syntaxes analyzed by PostCSS. You can specify scss, sass, less or sugarss. By default, non-standard syntaxes such as .scss, .sass,.less and .sss files are detected.

ignore-path

This option allows you to exclude files from analysis. By default stylelint detects and uses .stylelintrc, even if this option isn't set. If you'd like to use other ignore files, such as .gitignore, .eslintignore and so on, put them in this option.

ignore-disables

This option allows you to ignore all disable comments, i.e. /* stylelint-disable block-no-empty */. If you would like to ignore these comments, set this to true.

report-needless-disables

This option allows you to control whether stylelint-disable comments are reported or not.

quiet

This option allows you to ignore warnings and only report errors.

glob

This option allows you to specify the file extensions which are inspected by stylelint. By default, **/*.{css,less,scss,sss} files are included.

← SwiftLintSCSS-Lint →
  • Getting Started
  • Default Configuration
  • Configuration via sideci.yml
    • Options
Sider Documentation
Docs
Getting StartedAnalysis ToolsEnterprise
Sider
Sider TopTerms of ServicePrivacy
Social
BlogGitHubStar
Copyright © 2019 Sider, Inc.