src/helper/rules.js   A
last analyzed

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 11
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 4
c 1
b 0
f 0
nc 1
mnd 0
bc 0
fnc 4
dl 0
loc 11
rs 10
bpm 0
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A rules.js ➔ ??? 0 1 1
1
const { statSync, readdirSync } = require('fs')
2
const { join } = require('path')
3
4
const isDirectory = ruleDir => statSync(ruleDir).isDirectory()
5
6
module.exports = {
7
  getAllRuleName: ruleDir =>
8
    readdirSync(ruleDir).filter(name => isDirectory(join(ruleDir, name))),
9
10
  load: path => require(path)
11
}
12