question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

stylefmt example broken for multiple files

See original GitHub issue

Here is a minimal example: https://github.com/richardgill/lint-staged-stylefmt-bug-example

stylefmt doesn’t accept multiple files on the command line. Looks like there used to be a --list parameter, but it’s not longer there.

Using --recursive works for me via npm run but doesn’t work with lint-staged. I think I am seeing an additional -- getting added to the command which messes with stylefmt.

Note that is only an issue for when you break the css for multiple files (add spaces before the }'s to test. I think it works ok for one file.

Could you confirm that lint-staged is adding an extra -- and once I full understand what’s going on. We can raise an issue with stylefmt.

Thanks,

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
chaucerbaocommented, Jun 21, 2017

@okonet Confirmed that it works. Thanks!

1reaction
chaucerbaocommented, Jun 16, 2017

The workaround I’m using to account for -- with stylefmt is:

// package.json
...
  "lint-staged": {
    "*.scss": [
      "npm run stylefmt",
      "stylelint",
      "git add"
    ]
  },
  "scripts": {
    "stylefmt": "stylefmt --recursive"
  },
...
Read more comments on GitHub >

github_iconTop Results From Across the Web

Stylefmt committing wrong scss file when multiple ... - GitHub
Stylefmt committing wrong scss file when multiple files committed at the same time #317. Open. jebzaki opened this issue on Jun 28, ...
Read more >
Lint your CSS with stylelint
For example, you can disallow empty blocks, invalid hex values, duplicate selectors, unknown animation names, and mistaken linear-gradient ...
Read more >
Css Autoprefixer for multiple files in single function/go
Since you asked for an answer : In your IDE (I take Visual Studio Code as an example):. Ctrl+Maj+F will launch the global...
Read more >
vscode-stylefmt - Visual Studio Marketplace
Launch VS Code Quick Open ( Ctrl+P ), paste the following command, and press enter. Copy. Copied to clipboard. More Info ...
Read more >
The LaTEXinfo Documentation Format
different documents, one providing on-line information and the other for a printed manual, you need write only one document. When the system is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found