Created
October 3, 2019 22:40
-
-
Save shawnbot/3fa428e604a8b6c86a35ec5730c6763c to your computer and use it in GitHub Desktop.
lint only some variable types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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