Skip to content

Commit

Permalink
export stage-0 config. fixes #188
Browse files Browse the repository at this point in the history
  • Loading branch information
benmosher committed Feb 25, 2016
1 parent 9b05d72 commit 6dc9bf8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ export const rules = {
export const configs = {
'errors': require('../config/errors'),
'warnings': require('../config/warnings'),

// shhhh... work in progress "secret" rules
'stage-0': require('../config/stage-0'),
}
11 changes: 11 additions & 0 deletions tests/src/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ describe('package', function () {
})
})

it('exports all configs', function (done) {
fs.readdir(path.join(process.cwd(), 'config'), function (err, files) {
if (err) { done(err); return }
for (let file of files) {
if (file[0] === '.') continue
expect(module.configs).to.have.property(file.slice(0, -3)) // drop '.js'
}
done()
})
})

it('has configs only for rules that exist', function () {
for (let configFile in module.configs) {
let preamble = 'import/'
Expand Down

0 comments on commit 6dc9bf8

Please sign in to comment.