Sider Documentation

Sider Documentation

  • Enterprise
  • News
  • Sider Top

›CSS

Getting Started

  • Home
  • Intro Videos
  • Setting up Sider
  • Dashboard Overview
  • Repository Settings
  • Custom Analysis Configuration
  • Recommended Ruleset
  • Working with Issues
  • Permissions
  • Skip Analyzing

Analysis Tools

    Ruby

    • RuboCop
    • Reek
    • Querly
    • Rails Best Practices
    • Brakeman
    • HAML-Lint
    • Slim-Lint (beta)

    Java

    • Checkstyle
    • PMD
    • JavaSee

    Kotlin

    • ktlint (beta)
    • detekt (beta)

    JavaScript and Flavors

    • ESLint
    • JSHint
    • TyScan
    • CoffeeLint
    • TSLint (deprecated)

    CSS

    • stylelint
    • SCSS-Lint (deprecated)

    PHP

    • PHP_CodeSniffer
    • PHPMD
    • Phinder

    Python

    • Flake8
    • Pylint (beta)

    Swift

    • SwiftLint

    Go

    • GolangCI-Lint

    C/C++

    • Cppcheck
    • cpplint
    • Clang-Tidy (beta)

    C#

    • FxCop (beta)

    Shell script

    • ShellCheck

    Dockerfile

    • hadolint

    Markdown

    • remark-lint

    Others

    • Goodcheck
    • Misspell
    • LanguageTool (beta)
    • PMD CPD (beta)

Custom Rules

  • Intro to Custom Rules
  • Goodcheck
  • Tips & Tricks

Advanced Settings

  • Inline Comments
  • Private Dependencies
  • Restricting access to Close button
  • Transferring a repository

Billing and Plans

  • Billing and Plans

Troubleshooting

  • Troubleshooting

Enterprise

  • Outline
  • System Overview
  • Installation
  • Configuration
  • Operation
  • Update
  • Load Balancer
  • MySQL
  • Redis
  • MinIO
  • Amazon S3
  • GitHub Enterprise Server
  • Clustering
  • Example Deployments

    • Single Node with Docker Compose

    Releases

    • Overview
    • February 2021
    • January 2021
    • December 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • February 2020
    • January 2020
    • November 2019
    • Older releases

News

  • 2021
  • 2020
  • 2019
Edit

stylelint

Supported VersionLanguageWebsite
8.3.0+ (default: 13.11.0)CSS and flavors (e.g. Sass)https://stylelint.io

stylelint is a pluggable linter to help you avoid errors and enforce conventions for CSS and CSS-like languages. It provides many core rules and third-party rules by the community.

Getting Started

To start using stylelint, enable it in your repository settings.

If you want to use a version except for the Sider default version or use some plugins or shareable configurations, install it into your repository as follows:

$ npm install stylelint --save-dev

$ npm install stylelint-config-standard --save-dev

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

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

Default Configuration for stylelint

If you have no custom configurations, Sider uses the default configuration.

In the same way, Sider users the default ignore file if not exist.

Configuration

Here is an example configuration via sider.yml:

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

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

NameTypeDefault
root_dirstring-
npm_installboolean, string-
globstring**/*.{css,less,sass,scss,sss}
configstring-
syntaxstring-
ignore-pathstring-
ignore-disablesbooleanfalse
report-needless-disablesbooleanfalse
quietbooleanfalse

See also the official document for details about each option.

glob

This option allows you to specify files or directories to analyze. Glob patterns are available.

config

This option allows you to specify a configuration file you want. See also the --config option.

syntax

This option allows you to specify a syntax you want. If omitted, stylelint automatically infers the syntaxes. See also the --syntax option.

ignore-path

This option allows you to specify a ignore file. See also the --ignore-path option.

ignore-disables

This option allows you to ignore all the disable-comments, e.g. /* stylelint-disable block-no-empty */. See also the --ignore-disables option.

report-needless-disables

This option allows you to select whether reporting unused stylelint-disable comments or not. See also the --report-needless-disables option.

quiet

This option allows you to select whether ignoring warnings and reporting only errors. See also the --quiet option.

← TSLint (deprecated)SCSS-Lint (deprecated) →
  • Getting Started
  • Default Configuration for stylelint
  • Configuration
    • glob
    • config
    • syntax
    • ignore-path
    • ignore-disables
    • report-needless-disables
    • quiet
Sider Documentation
Docs
Getting StartedAnalysis ToolsEnterprise
Sider
Sider TopTerms of ServicePrivacy
Social
BlogGitHubStar
Copyright © 2021 Sider, Inc.