Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed May 29, 2022
1 parent 8f4189d commit 53a89d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/config/normalize/lib/rule/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import { normalizeQuery } from 'wild-wild-parser'
import { wrapError } from '../../../../error/wrap.js'
import { DefinitionError } from '../error.js'

import { normalizeParallelRules } from './parallel.js'
import { validateRuleProps } from './validate.js'

// Validate and normalize rules.
// All methods and properties that use queries can use either the string or the
// path syntax.
export const normalizeRules = function ({ rules, all, ruleProps, sync }) {
validateRules(rules)
return rules.map((rule) => normalizeRule({ rule, all, ruleProps, sync }))
const rulesA = normalizeParallelRules(rules)
validateRules(rulesA)
return rulesA.map((rule) => normalizeRule({ rule, all, ruleProps, sync }))
}

const validateRules = function (rules) {
Expand Down
3 changes: 3 additions & 0 deletions src/config/normalize/lib/rule/parallel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const normalizeParallelRules = function (rules) {
return rules
}

0 comments on commit 53a89d1

Please sign in to comment.