|
17 | 17 | * along with this program; if not, write to the Free Software Foundation, |
18 | 18 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
19 | 19 | */ |
20 | | -import * as fs from 'fs'; |
21 | | -import * as path from 'path'; |
22 | 20 | import { TSESLint } from '@typescript-eslint/experimental-utils'; |
23 | 21 |
|
24 | | -const sonarjsRules: string[] = fs |
25 | | - .readdirSync(path.join(__dirname, 'rules')) |
26 | | - .map(filename => filename.substr(0, filename.lastIndexOf('.ts'))); |
| 22 | +const sonarjsRules: string[] = [ |
| 23 | + 'cognitive-complexity', |
| 24 | + 'elseif-without-else', |
| 25 | + 'generator-without-yield', |
| 26 | + 'max-switch-cases', |
| 27 | + 'no-all-duplicated-branches', |
| 28 | + 'no-collapsible-if', |
| 29 | + 'no-collection-size-mischeck', |
| 30 | + 'no-duplicate-string', |
| 31 | + 'no-duplicated-branches', |
| 32 | + 'no-element-overwrite', |
| 33 | + 'no-empty-collection', |
| 34 | + 'no-extra-arguments', |
| 35 | + 'no-gratuitous-expressions', |
| 36 | + 'no-identical-conditions', |
| 37 | + 'no-identical-expressions', |
| 38 | + 'no-identical-functions', |
| 39 | + 'no-ignored-return', |
| 40 | + 'no-inverted-boolean-check', |
| 41 | + 'no-nested-switch', |
| 42 | + 'no-nested-template-literals', |
| 43 | + 'no-one-iteration-loop', |
| 44 | + 'no-redundant-boolean', |
| 45 | + 'no-redundant-jump', |
| 46 | + 'no-same-line-conditional', |
| 47 | + 'no-small-switch', |
| 48 | + 'no-unused-collection', |
| 49 | + 'no-use-of-empty-return-value', |
| 50 | + 'no-useless-catch', |
| 51 | + 'non-existent-operator', |
| 52 | + 'prefer-immediate-return', |
| 53 | + 'prefer-object-literal', |
| 54 | + 'prefer-single-boolean-return', |
| 55 | + 'prefer-while', |
| 56 | +]; |
27 | 57 |
|
28 | 58 | const sonarjsRuleModules: { [key: string]: any } = {}; |
29 | 59 |
|
|
0 commit comments