StyleLint - Ignore specific folders and files

I used the following configuration in the stylelint config file:

{
    "extends": "stylelint-config-recommended",
    "ignoreFiles": [
        "app/bootstrap/**/*.less"
    ]
}

And it skipped the files in the specified folder.


Another way to exclude something with a stylelint is to use the .stylelintignore file.

As the documentation says:

You can use a .stylelintignore file to ignore specific files. For example:

**/*.js
vendor/**/*.css

The patterns in your .stylelintignore file must match .gitignore syntax. (Behind the scenes, node-ignore parses your patterns.) Your patterns in .stylelintignore are always analyzed relative to process.cwd().

stylelint looks for a .stylelintignore file in process.cwd(). You can also specify a path to your ignore patterns file (absolute or relative to process.cwd()) using the --ignore-path (in the CLI) and ignorePath (in JS) options.