barraponto / neutrino-middleware-stylelint

Stylelint support in Neutrino
https://www.npmjs.com/package/neutrino-middleware-stylelint
0 stars 0 forks source link

deepmerge of options makes it impossible to overwrite #1

Closed timkelty closed 7 years ago

timkelty commented 7 years ago

Didn't want to lint my output, just my source.

  neutrino.use(stylelint, {
    files: [path.join(neutrino.options.source +  '**/*.+css')],
  });

Doesn't work though, because of the use of deepmerge, which by default also merges arrays :(

barraponto commented 7 years ago

@constgen provided a solution here https://github.com/barraponto/neutrino-preset-stylelint-standard/pull/1 see if that works for you (i'll fix it if it does)

timkelty commented 7 years ago

Finally got around to testing - this works for me 👍

Worth noting - it solves my use-case, but doesn't necessarily address the core issue. That is, if someone wanted to overwrite your files setting, they would be unable, because deepmerge is going to merge arrays together by default.

barraponto commented 7 years ago

I see. It's an easy fix though :)