@splunk/stylelint-config
v5.1.0
Published
Standardized Splunk stylelint configuration
Downloads
5,149
Keywords
Readme
@splunk/stylelint-config
A standardized stylelint config. It's designed to work well with styled-components
and prettier, but can be used independently as well.
Install
Install the package and its dependencies.
- Install the peer dependencies:
npm install --save-dev stylelint@^15 - Install the package:
npm install --save-dev @splunk/stylelint-config
Usage
Add the package to your stylelint configuration file. If you don't have one, create stylelint.config.js in
the root directory of your package.
module.exports = {
extends: '@splunk/stylelint-config'
};Disallow test selectors in styles
To report styling selectors that target attributes beginning with data-test, add the opt-in
no-test-selectors configuration:
module.exports = {
extends: [
'@splunk/stylelint-config',
'@splunk/stylelint-config/no-test-selectors',
],
};This configuration reports violations as warnings so adopting it does not fail CI unless the consuming project explicitly configures Stylelint to fail on warnings.
