Integrate SCSS linter

Edit on GitHub

Follow the steps below to integrate the SCSS linter into your project.

1. Install the dependencies

To install the dependencies:

  1. Install Stylelint:
npm install stylelint@13.7.x --save-dev
  1. Install config for Stylelint:
npm install @spryker/frontend-config.stylelint --save-dev
  1. Install the CLI parser:
npm install commander@4.0.x --save-dev

2. Update the scripts

To update the scripts:

  1. Add the SCSS lint script to /frontend/libs/stylelint.mjs

See this example file: stylelint.mjs.

  1. Adjust the /package.json scripts:
"scripts": {
    ....
    "yves:stylelint": "node ./frontend/libs/stylelint.mjs",
    "yves:stylelint:fix": "node ./frontend/libs/stylelint.mjs --fix"
}
  1. Add the ignore file /.stylelintignore:
# Ignore paths
**/node_modules/**
**/DateTimeConfiguratorPageExample/**
**/dist/**
public/*/assets/**