-
Notifications
You must be signed in to change notification settings - Fork 21
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 formatting for Nunjucks files #3218
Conversation
✅ Deploy Preview for ons-design-system-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…ital/design-system into add-formatting-for-nunjucks-files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find anything wrong. I have tested in locally and run the test command and all have passed. Considering the nmber of changes in the PR is there a way that you can point me in the direction of the components you had to manually change and reformat? I think you also mentioned that you had to rewrite some tests?
Ive added a list of components that needed refactoring to the description. I haven't touched any tests other than the html snapshot |
What is the context of this PR?
Fixes: ONSdigital/design-team#58
Adds the Jinja plugin (
prettier-plugin-jinja-template
) to prettier and have then run prettier on all our Nunjucks files to format them correctly. I have also added them to the lint staging step so that they are formatted on the Husky pre commit hook. I have also fixed all errors and warnings from running prettier which has required some refactoring.Some other fixes have gone in too:
variants
param on the related content component in some examples. This was having no effect because it's hardcoded to "bare" in the macro.How to review this PR
Checklist
This needs to be completed by the person raising the PR.