UNPKG

1.54 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.configs = exports.rules = void 0;
4const sonarjsRules = [
5 'cognitive-complexity',
6 'elseif-without-else',
7 'max-switch-cases',
8 'no-all-duplicated-branches',
9 'no-collapsible-if',
10 'no-collection-size-mischeck',
11 'no-duplicate-string',
12 'no-duplicated-branches',
13 'no-element-overwrite',
14 'no-empty-collection',
15 'no-extra-arguments',
16 'no-gratuitous-expressions',
17 'no-identical-conditions',
18 'no-identical-expressions',
19 'no-identical-functions',
20 'no-ignored-return',
21 'no-inverted-boolean-check',
22 'no-nested-switch',
23 'no-nested-template-literals',
24 'no-one-iteration-loop',
25 'no-redundant-boolean',
26 'no-redundant-jump',
27 'no-same-line-conditional',
28 'no-small-switch',
29 'no-unused-collection',
30 'no-use-of-empty-return-value',
31 'no-useless-catch',
32 'non-existent-operator',
33 'prefer-immediate-return',
34 'prefer-object-literal',
35 'prefer-single-boolean-return',
36 'prefer-while',
37];
38const sonarjsRuleModules = {};
39exports.rules = sonarjsRuleModules;
40const configs = {
41 recommended: { plugins: ['sonarjs'], rules: {} },
42};
43exports.configs = configs;
44sonarjsRules.forEach(rule => {
45 sonarjsRuleModules[rule] = require(`./rules/${rule}`);
46 const { meta: { docs: { recommended }, }, } = sonarjsRuleModules[rule];
47 configs.recommended.rules[`sonarjs/${rule}`] = recommended === false ? 'off' : recommended;
48});
49//# sourceMappingURL=index.js.map
\No newline at end of file