import type { TSESLint } from '@typescript-eslint/experimental-utils' ; const sonarjsRules = [ 'cognitive-complexity' , 'elseif-without-else' , 'max-switch-cases' , 'no-all-duplicated-branches' , 'no-collapsible-if' , 'no-collection-size-mischeck' , 'no-duplicate-string' , 'no-duplicated-branches' , 'no-element-overwrite' , 'no-empty-collection' , 'no-extra-arguments' , 'no-gratuitous-expressions' , 'no-identical-conditions' , 'no-identical-expressions' , 'no-identical-functions' , 'no-ignored-return' , 'no-inverted-boolean-check' , 'no-nested-switch' , 'no-nested-template-literals' , 'no-one-iteration-loop' , 'no-redundant-boolean' , 'no-redundant-jump' , 'no-same-line-conditional' , 'no-small-switch' , 'no-unused-collection' , 'no-use-of-empty-return-value' , 'no-useless-catch' , 'non-existent-operator' , 'prefer-immediate-return' , 'prefer-object-literal' , 'prefer-single-boolean-return' , 'prefer-while' , ] ; const sonarjsRuleModules = { } ; const configs = { recommended : { plugins : [ 'sonarjs' ] , rules : { } } , } ; sonarjsRules . forEach ( rule => { sonarjsRuleModules [ rule ] = require ( `./rules/${ rule }` ) ; const { meta : { docs : { recommended } , } , } = sonarjsRuleModules [ rule ] ; configs . recommended . rules ! [ `sonarjs/${ rule }` ] = recommended === false ? 'off' : recommended ; } ) ; export { sonarjsRuleModules as rules , configs } ;