Total Complexity | 0 |
Complexity/F | 0 |
Lines of Code | 25 |
Function Count | 0 |
Duplicated Lines | 25 |
Ratio | 100 % |
Changes | 0 |
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
1 | View Code Duplication | export default { |
|
|
|||
2 | 'files' : [ '**/bin/**', '**/cli/**' ], |
||
3 | 'excludedFiles' : [ '*.test.js', 'tests/**' ], |
||
4 | 'rules' : { |
||
5 | 'import/no-commonjs' : [ 2, { |
||
6 | 'allowPrimitiveModules' : true, |
||
7 | 'allowConditionalRequire' : true |
||
8 | } ], |
||
9 | |||
10 | 'unicorn/no-process-exit' : 0, |
||
11 | 'unicorn/filename-case' : [ |
||
12 | 'error', |
||
13 | { |
||
14 | 'cases' : { |
||
15 | 'kebabCase' : true |
||
16 | } |
||
17 | } |
||
18 | ], |
||
19 | |||
20 | 'no-process-exit' : 0, |
||
21 | |||
22 | 'node/no-process-exit' : 0, |
||
23 | 'node/shebang' : 0 |
||
24 | } |
||
25 | }; |
||
26 |