Create Stylelint Configuration to Be Shared

Create a stylelint configuration that will be used with all the projects using our boilerplate. It should by default enable all rules which should be accomplishable by including the following plugins in the configuration:

Hardcoded variable file named src/theme/vars.scss

:root {
  --blue: #1e90ff;
  --white: #ffffff;
}

Random SCSS file anywhere in the project:

div {
  background-color: #1e90ff;
}

In this example, the div's background-color should be changed to var(--blue).

Ideally, you should be a web developer who uses CSS and wants to perfect their own stylelint configuration. The .stylelintrc.js format should be used. The file will be stored in all projects under .common/.stylelintrc.js. The stylelintrc.js file should detect whether a file exists in the root directory that is named .stylelintrc and import the settings from .stylelintrc as overrides. This way the root for projects that don't need to customize the settings stay clutter free but we also allow project owners to manually override our settings which will not be very permissive.

Configure default formatter to be https://www.npmjs.com/package/stylelint-formatter-pretty

Edited by Brian Zalewski