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

Fix Node.js API glob returning empty array #4929

Closed
lukasholzer opened this issue Sep 9, 2020 · 3 comments
Closed

Fix Node.js API glob returning empty array #4929

lukasholzer opened this issue Sep 9, 2020 · 3 comments

Comments

@lukasholzer
Copy link

Clearly describe the bug

The nodejs api is using globby to collect the scss files for linting. When used on windows it returns an empty array for the list of files in standalone.js - the filePaths is an empty array.

image

I've already opened a bug at sindresorhus/globby#152

Workaround

It would be nice to have an option where I can provide the file paths on my own and not rely on any globbing so that I can pass a list of absolute file paths that should be linted.

Which version of stylelint are you using?

"version": "13.2.1"

How are you running stylelint: CLI, PostCSS plugin, Node.js API?

    import { lint, LinterResult } from 'stylelint';

    const files = ["./path/to/files/*.scss"];

    lintingOutcome = await lint({
      configFile: normalize(config),
      configBasedir: process.cwd(),
      files: files,
      formatter: junitFormatter,
    });
@jeddy3 jeddy3 changed the title Stylelint nodejs api does not work on windows due to a bug with globby Fix Node.js API glob returning empty array Nov 17, 2020
@jeddy3 jeddy3 added the status: needs clarification triage needs clarification from author label Nov 17, 2020
@jeddy3
Copy link
Member

jeddy3 commented Nov 17, 2020

@lukasholzer Thanks for the report.

Can you try 13.8.0, please? This issue may have been fixed by #4931.

@lukasholzer
Copy link
Author

@jeddy3 Thx is now working with the latest version. The question even though is for me can we implement the feature of passing the files directly? As this might be way more performant if I need to run only for a limited set of files.

Are you willing to take contributions on that?

@Mouvedia Mouvedia removed the status: needs clarification triage needs clarification from author label Feb 4, 2023
@Mouvedia
Copy link
Contributor

Mouvedia commented Feb 4, 2023

@lukasholzer yes we are.
Can you open a new feature request for it?

@Mouvedia Mouvedia closed this as completed Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants