Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some options can't be configured with .labrc.js #609

Closed
feugy opened this issue Jun 24, 2016 · 2 comments
Closed

some options can't be configured with .labrc.js #609

feugy opened this issue Jun 24, 2016 · 2 comments
Assignees
Labels
bug
Milestone

Comments

@feugy
Copy link
Contributor

@feugy feugy commented Jun 24, 2016

First of all, thank you for that configuration file !

Right now, some options can't be overridden.
It's because cli settings overrides file options, and because unspecified cli options have default values (like linter, lint-errors-threshold...).

Maybe the merge should take cli options (without default), then file options, then defaults ?

@geek geek added the bug label Jun 24, 2016
@geek

This comment has been minimized.

Copy link
Member

@geek geek commented Jun 24, 2016

@feugy, thanks. We will need to move the merge operation to happen earlier in the cli options function and to merge in cli defaults after the file/argv options... as you are suggesting :)

@feugy

This comment has been minimized.

Copy link
Contributor Author

@feugy feugy commented Jun 24, 2016

FYI the current way of handling transformers in option file is tricky but really powerfull.
In my case, I need to apply two transformers to .js files, which was not possible with the cli options:

const babelTransform = require('lab-babel').find(t => t.ext === 'js').transform
const assertTransform = require('lab-espower-transformer')[0].transform

module.exports = {
  coverage: true,
  lint: false,
  transform: [{
    ext: 'js',
    // combines both transformations
    transform: (content, filename) => assertTransform(babelTransform(content, filename), filename)
  }],
  // equivalent of verbose
  progress: 2
}
@geek geek self-assigned this Jun 26, 2016
@geek geek added this to the 10.8.3 milestone Jun 26, 2016
@geek geek closed this in #613 Jun 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.