Closed greatislander closed 3 years ago
It appears that fluid.flatten
takes a single argument. In how it appears to work in the provided example, you could just do an array concatenation or pass in an array of sources to fluid.flatten
.
That's right - the call to fluid.flatten is incorrect since this function accepts an array rather than an argument list - https://docs.fluidproject.org/infusion/development/coreapi#fluidflattenarray This could be written out as a long-form expander as
"includes": {
expander: {
func: "fluid.flatten",
args: ["{that}.options.config.sources.scss", "{that}.options.config.sources.css"]
}
}
or else as a dedicated function - it's not like fluid.flatten does very much
@amb26 thanks for clarifying— looks like this would cause problems with the JSON check's configuration as well:
I didn't end up making the first argument an array, so we have the same problem in a different form.
Describe the bug
In my work on integrating
fluid-lint-all
into https://github.com/fluid-project/infusion/pull/1014, I've encountered a bug related to the stylelint check where SCSS files are not included properly.To reproduce
Steps to reproduce the behavior:
node_modules/fluid-lint-all/src/js/stylelint.js
, insertconsole.log(filesToScan);
after line 35.npm run lint
..css
files.Expected behavior
The files list includes
.scss
files insrc/framework/preferences/css/sass
.Technical details
Desktop
Additional context or notes
I tried modifying
node_modules/fluid-lint-all/src/js/lint-all.js
and noticed that if I changed line 189 from:To:
I encountered the opposite problem— ONLY
.scss
files were linted and all.css
files were skipped. These leads me to think that there's something wrong with the wayfluid.flatten
is merging the two source lists.