Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (root, result) => {
const validOptions = utils.validateOptions(result, ruleName, {
actual: value,
possible: ["always", "never"]
});
if (!validOptions) {
return;
}
root.walkAtRules("include", mixinCall => {
// If it is "No parens in argumentless calls"
if (
value === "never" &&
mixinCall.params.search(/\(\s*?\)\s*?$/) === -1
) {
return;
}
return (root, result) => {
const validOptions = utils.validateOptions(
result,
ruleName,
{
actual: primaryOption
},
{
actual: secondaryOptions,
possible: {
ignoreAtRules: [isRegExp, isString]
},
optional: true
}
);
if (!validOptions) {
return;
return (root, result) => {
const validOptions = utils.validateOptions(
result,
ruleName,
{
actual: expectation,
possible: ["always", "never"]
},
{
actual: options,
possible: {
except: ["first-nested", "after-comment", "after-dollar-variable"],
ignore: ["after-comment", "inside-single-line-block"],
disableFix: isBoolean
},
optional: true
}
);
return (root, result) => {
const validOptions = utils.validateOptions(
result,
ruleName,
{
actual: expectation,
possible: ["always", "never"]
},
{
actual: options,
possible: {
ignore: ["single-argument"]
},
optional: true
}
);
if (!validOptions) {
return (root, result) => {
const validOptions = utils.validateOptions(
result,
ruleName,
{
actual: expectation,
possible: ["always-last-in-chain"]
},
{
actual: options,
possible: {
disableFix: isBoolean
},
optional: true
}
);
if (!validOptions) {
return (root, result) => {
const validOptions = utils.validateOptions(result, ruleName, { actual });
if (!validOptions || !actual) {
return;
}
root.walkRules(rule => {
let selector = null;
if (!isStandardSyntaxRule(rule)) {
return;
}
selector = rule.selector;
if (!selector) {
return;
return (root, result) => {
const validOptions = utils.validateOptions(result, ruleName, {
actual: expectation,
possible: ["always", "never"]
});
if (!validOptions) {
return;
}
eachRoot(root, checkRoot);
function checkRoot(root) {
const rootString = root.source.input.css;
if (rootString.trim() === "") {
return;
}
return (root, result) => {
const validOptions = utils.validateOptions(result, ruleName, {
actual: expectation,
possible: ["always", "never"]
});
if (!validOptions) {
return;
}
variableColonSpaceChecker({
root,
result,
locationChecker: checker.before,
checkedRuleName: ruleName,
position: "before",
expectation,
context
return function(root, result) {
const validOptions = utils.validateOptions(
result,
ruleName,
{
actual
},
{
actual: options,
possible: {
ignoreProperties: [isString]
},
optional: true
}
);
if (!validOptions) {
return;
return (root, result) => {
const validOptions = utils.validateOptions(result, ruleName, {
actual: value
});
if (!validOptions) {
return;
}
const mixins = {};
root.walkAtRules(decl => {
const isMixin = decl.name === "mixin";
if (!isMixin) {
return;
}