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

Add helpful warning for invalid file pattern for Windows users #3626

Open
hudochenkov opened this issue Aug 29, 2018 · 2 comments
Open

Add helpful warning for invalid file pattern for Windows users #3626

hudochenkov opened this issue Aug 29, 2018 · 2 comments
Labels
good first issue is good for newcomers status: ask to implement ask before implementing as may no longer be relevant type: enhancement a new feature that isn't related to rules

Comments

@hudochenkov
Copy link
Member

What is the problem you're trying to solve?

Users on Windows sometimes have problems to start using stylelint, because of invalid CLI file name pattern params. E. g., #3624.

What solution would you like to see?

I believe we can detect invalid quotes in a file pattern for Windows users, and show a warning with a correct example.

Example for CLI:

$ stylelint './file.css'

  Please, use double quotes for a file pattern:

      stylelint "./file.css"

Example for npm script:

{
    "scripts": {
        "lint:css": "stylelint './file.css'"
    }
}
$ npm run lint:css

  Please, use escaped double quotes for a file pattern in your npm scripts:

      stylelint \"./file.css\"

I don't know if it's possible to do the second one, but the first one is quite doable.

@hudochenkov hudochenkov added status: needs discussion triage needs further discussion type: enhancement a new feature that isn't related to rules labels Aug 29, 2018
@jeddy3 jeddy3 removed the type: enhancement a new feature that isn't related to rules label Sep 6, 2018
@jeddy3
Copy link
Member

jeddy3 commented Sep 6, 2018

SGTM. I think anything that improves the DX is a good thing.

@jeddy3 jeddy3 added status: ready to implement is ready to be worked on by someone type: enhancement a new feature that isn't related to rules good first issue is good for newcomers and removed status: needs discussion triage needs further discussion labels Sep 6, 2018
dom111 added a commit to dom111/stylelint that referenced this issue Dec 2, 2019
…lint#3626)

Add information to help out users when single quotes are wrapping the filenames passed to `cli.js`. Only shares help on Windows machines.
dom111 added a commit to dom111/stylelint that referenced this issue Dec 2, 2019
…lint#3626)

Add information to help out users when single quotes are wrapping the filenames passed to `cli.js`. Only shares help on Windows machines.
dom111 pushed a commit to dom111/stylelint that referenced this issue Dec 10, 2019
…lint#3626)

Add information to help out users when single quotes are wrapping the filenames passed to `cli.js`. Only shares help on Windows machines.
dom111 added a commit to dom111/stylelint that referenced this issue Dec 10, 2019
…lint#3626)

Add information to help out users when single quotes are wrapping the filenames passed to `cli.js`. Only shares help on Windows machines.
dom111 added a commit to dom111/stylelint that referenced this issue Feb 24, 2020
…lint#3626)

Add information to help out users when single quotes are wrapping the filenames passed to `cli.js`. Only shares help on Windows machines.
@Mouvedia Mouvedia added status: wip is being worked on by someone status: ready to implement is ready to be worked on by someone and removed status: ready to implement is ready to be worked on by someone status: wip is being worked on by someone labels Feb 5, 2023
Copy link
Contributor

This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant.

@github-actions github-actions bot added status: ask to implement ask before implementing as may no longer be relevant and removed status: ready to implement is ready to be worked on by someone labels Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue is good for newcomers status: ask to implement ask before implementing as may no longer be relevant type: enhancement a new feature that isn't related to rules
Development

Successfully merging a pull request may close this issue.

3 participants