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

"make format" throws an exception when ./frontend/src folder does not contain any .?css or .override files #100

Open
elcoda opened this issue Oct 7, 2023 · 2 comments
Assignees

Comments

@elcoda
Copy link

elcoda commented Oct 7, 2023

``When using

make format

stylint throws an exception when ./frontend/src folder does not contain .css/.scss/.ovverride

"Error: No files matching the pattern "theme/**/*.{css,scss,less}, src/**/*.{css,scss,less}" were found.
    at standalone (/Users/xxxx/ploneconf2023/frontend/node_modules/stylelint/lib/standalone.js:261:43)
make[1]: *** [format-stylelint] Error 1
make: *** [format] Error 2"

To avoid it I used the --allow-empty-input option on stylelint, to have it working I changed the frontend/package.json file changing lines "stylelint:overrides" and "stylelint:overrides" in the following way:

"stylelint:overrides": "stylelint 'theme/**/*.overrides' 'src/**/*.overrides' --allow-empty-input",
"stylelint:fix": "yarn stylelint --allow-empty-input --fix && yarn stylelint:overrides --fix",

I have no clue to make this change permanent on cookiecutter-plone-starter.

Ivan

@fredvd
Copy link
Member

fredvd commented Oct 30, 2023

@sneridagh I've been bitten by this twice now. Is this a good option to add so that we can get rid of this problem, or will it mask other problems?

@fredvd fredvd self-assigned this Oct 30, 2023
@sneridagh
Copy link
Member

@fredvd the generator is already taken care of it. @elcoda as far as I know, the --allow-empty-input --fix are not compatible, are you sure that it's working? I know because I tried to fix it long ago.

If you don't have styles, then you have to remove the :fix from your flow until you have. That's how you workaround it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants