Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac authored and merge-me[bot] committed Sep 8, 2023
1 parent 2ad0675 commit 4de013b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ const camundaCloud12Rules = withConfig(camundaCloud11Rules, { version: '1.2' });
const camundaCloud13Rules = withConfig(camundaCloud12Rules, { version: '1.3' });

const camundaCloud80Rules = withConfig({
...omit(camundaCloud13Rules, 'no-template'),
'secrets': 'error'
...omit(camundaCloud13Rules, 'no-template')
}, { version: '8.0' });

const camundaCloud81Rules = withConfig({
Expand Down Expand Up @@ -159,7 +158,8 @@ function withConfig(rules, config) {
let rulesWithConfig = {};

for (let name in rules) {
rulesWithConfig[ name ] = [ rules[ name ], config ];
const type = Array.isArray(rules[ name ]) ? rules[ name ][0] : rules[ name ];
rulesWithConfig[ name ] = [ type, config ];
}

return rulesWithConfig;
Expand Down
1 change: 1 addition & 0 deletions test/config/configs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ describe('configs', function() {
'no-task-schedule': 'error',
'no-template': 'error',
'no-zeebe-properties': 'error',
'secrets': 'error',
'sequence-flow-condition': 'error',
'signal-reference': 'error',
'subscription': 'error',
Expand Down

0 comments on commit 4de013b

Please sign in to comment.