Skip to content

Commit

Permalink
chore: basename
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Mar 15, 2019
1 parent c5cea04 commit a3abdd2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -6,6 +6,7 @@ const path = require('path');
const rules = fs
.readdirSync(path.join(__dirname, 'rules'))
.filter(rule => rule !== '__tests__' && rule !== 'util.js')
.map(rule => path.basename(rule, '.js'))
.reduce(
(acc, curr) => Object.assign(acc, { [curr]: require(`./rules/${curr}`) }),
{}
Expand Down

0 comments on commit a3abdd2

Please sign in to comment.