Skip to content

Instantly share code, notes, and snippets.

@shawnbot
Created October 3, 2019 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawnbot/3fa428e604a8b6c86a35ec5730c6763c to your computer and use it in GitHub Desktop.
Save shawnbot/3fa428e604a8b6c86a35ec5730c6763c to your computer and use it in GitHub Desktop.
lint only some variable types
const variables = require('stylelint-config-primer/plugins/variables')
const {DEFAULT_RULES} = variables
const variableRules = {}
for (const rule of Object.keys(DEFAULT_RULES)) {
variableRules[rule] = false
}
module.exports = {
plugins: [variables],
rules: {
'primer/variables': [true, Object.assign(variableRules, {
margin: DEFAULT_RULES.margin,
padding: DEFAULT_RULES.padding
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment